 example; the package name can be omitted)."
   (doom-initialize-packages)
   (when (package-installed-p name)
+    (when (doom-package-different-backend-p name)
+      (doom-delete-package name t))
     (user-error "%s is already installed" name))
   (let ((plist (or plist (cdr (assq name doom-packages))))
         (inhibit-message (not doom-debug-mode))

      (let ((sym (car pkg)))
        (when (and (or (not (doom-package-prop sym :freeze))
                       include-frozen-p)
                   (not (doom-package-prop sym :ignore)))
          (push sym
                (if (eq (doom-package-backend sym) 'quelpa)
                    quelpa-pkgs

  (plist-get (cdr (assq name doom-packages)) prop))

;;;###autoload
(defun doom-package-different-backend-p (name)
  "Return t if NAME (a package's symbol) has a new backend than what it was
installed with. Returns nil otherwise, or if package isn't installed."
  (cl-assert (symbolp name) t)
  (doom-initialize-packages)
  (and (package-installed-p name)
       (let* ((plist (cdr (assq name doom-packages)))
              (old-backend (doom-package-backend name t))
              (new-backend (if (plist-get plist :recipe) 'quelpa 'elpa)))
         (not (eq old-backend new-backend)))))

;;;###autoload
(defun doom-get-packages (&optional installed-only-p)
  "Retrieves a list of explicitly installed packages (i.e. non-dependencies).
Each element is a cons cell, whose car is the package symbol and whose cdr is
