             (spacemacs/replace-last-line-of-buffer
              (format "--> installing %s:%s... [%s/%s]"
                      (ht-get configuration-layer-all-packages pkg)
-                     pkg
-                     installed-count
-                     not-installed-count) t)
+                     pkg installed-count not-installed-count) t)
             (unless (package-installed-p pkg)
               (if (not (assq pkg package-archive-contents))
                   (spacemacs/append-to-buffer

   "--> fetching new package repository indexes...\n")
  (redisplay)
  (package-refresh-contents)
  (setq upgraded-count 0)
  (dolist (pkg configuration-layer-all-packages-sorted)
    ;; do not stop with errors on builtins and compilation fails
    (ignore-errors
      (let ((installed-version (configuration-layer//get-package-version pkg))
            (newest-version (configuration-layer//get-latest-package-version pkg)))
        ;; (message "package - %s" pkg)
        ;; (message "installed - %s" installed-version)
        ;; (message "latest - %s" newest-version)
        (unless (version<= newest-version installed-version)
          (progn 
            (setq upgraded-count (1+ upgraded-count))
            (spacemacs/replace-last-line-of-buffer
             (format "--> updating packge %s:%s (%s)..."
                     (ht-get configuration-layer-all-packages pkg)
                     pkg
                     upgraded-count
                     ))
            (redisplay)
            (configuration-layer//package-delete pkg)
            (package-install pkg)
            )))))
  (spacemacs/append-to-buffer
   (format (concat (if (> upgraded-count 0) "\n" "")
                   "--> %s packages updated.\n")
           upgraded-count))
  (redisplay))

(defun configuration-layer//initialize-packages ()
  "Initialize all the declared packages."

            (redisplay))
          (spacemacs/append-to-buffer "\n")))))

(defun configuration-layer//get-packages-to-update (packages)
  "Return a list of packages to update given a list of PACKAGES."
  (let (result)
    (dolist (pkg packages)
      ;; do not stop with errors on builtins and compilation fails
      (let ((installed-version (configuration-layer//get-package-version pkg))
            (newest-version (configuration-layer//get-latest-package-version
                             pkg)))
        ;; (message "package - %s" pkg)
        ;; (message "installed - %s" installed-version)
        ;; (message "latest - %s" newest-version)
        (unless (or (null installed-version)
                    (version<= newest-version installed-version))
          (push pkg result))))
    (reverse result)))

(defun configuration-layer/update-packages ()
  "Upgrade elpa packages"
  (interactive)
