Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove an installed package in Emacs (ver 24+)?

Tags:

emacs24

I'd like to remove several packages that I've installed. When I invoke package-list-packages, I notice that there is a 'd' (mark for deletion) command and an 'x' (execute). However, it seems like this simply removes the package name/description from the list and not the actual files under ~/.emacs.d/elpa. What am I doing wrong or missing? Surely there must be some way to remove installed packages.

like image 667
tkf Avatar asked May 09 '13 19:05

tkf


People also ask

How do I uninstall Emacs packages?

I found it by chance: bring on the package list, find the package(s) you want to remove, and press 'D'. When you are done, press 'X' and it will remove the packages.

Where are packages installed Emacs?

Once installed, the contents of a package are placed in a subdirectory of ~/. emacs. d/elpa/ (you can change the name of that directory by changing the variable package-user-dir ). The package subdirectory is named name - version , where name is the package name and version is its version string.


2 Answers

The command package-menu-mark-delete (key 'd') followed by package-menu-execute (key 'x') worked for me.

Also here is very good introduction: Package management in emacs - The good, the bad and the ugly

like image 99
Ted Feng Avatar answered Oct 10 '22 04:10

Ted Feng


I've noticed that all the installed packages end up at the bottom of the list. If a new version of the package you want to uninstall is available, it will occur twice in the *Packages* buffer, once for the new version, listed as available, and a second time, listed as installed, for the old version. Only the version listed as installed can be marked for deletion using d and subsequently removed using x, answering yes to the question in the mini-buffer. That removes the actual files in the elpa directory for me.

like image 37
Jonatan Lindén Avatar answered Oct 10 '22 04:10

Jonatan Lindén