   (let* ((layer (assq symlayer spacemacs-config-layers)))
          (plist-get (cdr layer) prop)))
 
-(defun contribsys/get-package-dependencies ()
+(defun contribsys/get-packages-dependencies ()
   "Returns a hash map where key is a dependency package symbol and value is
 a list of all packages which depend on it."
   (let ((result #s(hash-table size 200 data ())))

           (ext-file (concat dir "extensions.el")))
      (progn 
        ;; packages
        (unless (not (file-exists-p pkg-file))
          (load pkg-file)
          (dolist (pkg (eval (intern (format "%s-packages" (symbol-name sym)))))
            (unless (member pkg dotspacemacs-excluded-packages)
              (puthash pkg sym spacemacs-all-packages))))
        ;; extensions
        (unless (not (file-exists-p ext-file))
          (load ext-file)
          (dolist (pkg (eval (intern (format "%s-pre-extensions"
                                             (symbol-name sym)))))
            (unless (member pkg dotspacemacs-excluded-packages)
              (puthash pkg sym spacemacs-all-pre-extensions)))
          (dolist (pkg (eval (intern (format "%s-post-extensions"
                                             (symbol-name sym)))))
            (unless (member pkg dotspacemacs-excluded-packages)
              (puthash pkg sym spacemacs-all-post-extensions)))))))
  ;; number of chuncks for the loading screen
  (let ((total (+ (ht-size spacemacs-all-packages)
                  (ht-size spacemacs-all-pre-extensions)

(defun contribsys/delete-orphan-packages ()
  "Delete all the orphan packages."
  (interactive)
  (let* ((dependencies (contribsys/get-packages-dependencies))
         (implicit-packages (contribsys/get-implicit-packages))
         (orphans (contribsys/get-orphan-packages implicit-packages
                                                  dependencies))
