   (setq spacemacs-loading-dots-chunk-threshold
         (/ total spacemacs-loading-dots-chunk-count))))
 
-(defun config-system/install-packages ()
+(defun config-system//install-packages ()
   "Install the packages all the packages if there are not currently installed."
   (interactive)
-  (let* ((pkg-list (ht-keys config-system-all-packages))
-         (sorted-pkg-list (mapcar 'intern
-                                  (sort (mapcar 'symbol-name pkg-list)
-                                        'string<)))
-         (not-installed (remove-if 'package-installed-p sorted-pkg-list))
+  (let* ((not-installed (remove-if 'package-installed-p
+                                   config-system-all-packages-sorted))
          (not-installed-count (length not-installed)))
     ;; installation
     (if not-installed

          config-system-all-pre-extensions
          config-system-all-post-extensions)))

(defun config-system/read-packages-and-extensions ()
  "Load all packages and extensions declared in all layers and fill the
corresponding hash tables:
config-system-all-packages

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

(defun config-system//initialize-packages ()
  "Initialize all the declared packages."
  (mapc (lambda (x) (config-system/initialize-package
                     x (ht-get config-system-all-packages x)))
        config-system-all-packages-sorted))

(defun config-system/initialize-package (pkg layers)
  "Initialize the package PKG from the configuration layers LAYERS."
