How to remove installed elpa package

The package menu shows all known versions of a package.

As such, you may see an installed package listed as available as well, for instance, if there is a newer version of the same package available, or if the same package is available from different archives.

To delete such a package, simply scroll down in the list, or use C-s <PACKAGE-NAME> to search for occurrences of the package. Once you find the installed version of the package, press D to mark the package for deletion; if this fails, press d. You should see a D mark in the left before the package name. Press x to execute the action and actually delete the package.


I like to use the poor's man solution for that: just remove the directory for the unwanted package in ~/.emacs.d/elpa/ (or the directory specified in your package-directory-list).

EDIT: this solution is intended for scenarios where something went wrong (maybe a bug, maybe the result of manual tinkering with packages' data). Please use @lunaryon answer; it is the right way of doing this on the 99.9% of the cases.


For Emacs 25.1 and above, the command

M-x package-delete

raises a prompt with autocompletion into names of packages you have got installed.


I've just uninstalled django-snippets packages by

M-x package-list-packages
C-s django-snippets

Mark the package for deletion by typing d. Execute by typing x.

Exactly the same thing as removing the related directory inside ~/.emacs.d/elpa/.

NB, for the recent emacs, the command is list-packages (instead of packages-list-packages)

Tags:

Emacs