                      (version-to-list ver)
                    old-version)))
               ('elpa
-               (doom-refresh-packages)
                (let ((desc (cadr (assq name package-archive-contents))))
                  (when (package-desc-p desc)
                    (package-desc-version desc)))))))

(defun doom/packages-update ()
  "Interactive command for updating packages."
  (interactive)
  (doom-refresh-packages)
  (let ((packages (sort (doom-get-outdated-packages) #'doom--sort-alpha)))
    (cond ((not packages)
           (message! (green "Everything is up-to-date")))

         ('file-error
          (message! (bold (red "  FILE ERROR: %s" ex2)))
          (message! "  Trying again...")
          (doom-refresh-packages t)
          ,@body))
     ('user-error
      (message! (bold (red "  ERROR: %s" ex))))
