   (configuration-layer//filter-packages-with-deps
    pkg-names (lambda (x) (not (package-installed-p x)))))
 
-(defun configuration-layer//get-packages-to-update (packages)
-  "Return a list of packages to update given a list of PACKAGES."
+(defun configuration-layer//get-packages-to-update (pkg-names)
+  "Return a filtered list of PKG-NAMES to update."
   (configuration-layer//filter-packages-with-deps
-   packages
+   pkg-names
    (lambda (x)
      ;; the package is a built-in package
      ;; or a newest version is available
      (let ((installed-ver (configuration-layer//get-package-version-string x)))
-       (or (null installed-ver)
-           (version<= (configuration-layer//get-latest-package-version-string x)
-                      installed-ver))))))
+       (and (not (null installed-ver))
+            (version< installed-ver
+                      (configuration-layer//get-latest-package-version-string
+                       x)))))))
 
 (defun configuration-layer//configure-packages (packages)
   "Configure all passed PACKAGES honoring the steps order."

(defvar configuration-layer-paths (make-hash-table :size 256)
  "Hash table of layers locations. The key is a layer symbol and the value is
the path for this layer.")

(defvar configuration-layer-all-packages-sorted '()
  "Sorted list of all package symbols.")

(defvar configuration-layer-categories '()
  "List of strings corresponding to category names. A category is a

          (oref pkg :post-layers))))

(defun configuration-layer/update-packages (&optional always-update)
  "Update packages.

If called with a prefix argument ALWAYS-UPDATE, assume yes to update."
  (interactive "P")
  (spacemacs-buffer/insert-page-break)
  (spacemacs-buffer/append
