Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove installed elpa package

Tags:

emacs

This is strange, the list-packages buffer shows "available" as the status for some packages that are actually installed. Shouldn't that column show "installed" for them? When I click on one, a new buffer opens to inform me that the package is installed, but offers no uninstall option. By comparison, other packages I do not have installed show as "available" with an "install" option next to them.

How do I uninstall an installed package? The one I'm currently looking to axe is smooth-scrolling.

like image 783
johnbakers Avatar asked Dec 12 '13 10:12

johnbakers


People also ask

How do I see what packages are installed in Emacs?

The command M-x list-packages brings up the package menu. This is a buffer listing all the packages that Emacs knows about, one on each line, with the following information: The package name (e.g., ' auctex '). The package's version number (e.g., ' 11.86 ').


2 Answers

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.

like image 178
lunaryorn Avatar answered Sep 22 '22 04:09

lunaryorn


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.

like image 38
juanleon Avatar answered Sep 22 '22 04:09

juanleon