Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete built-in packages in Emacs

Tags:

emacs

elpa

Is it possible to remove built-in Emacs packages like "tetris"? They can't be marked to be deleted in package list as of 24.1. It would be nice to have a minimal installation of Emacs - even though barely useful - by deleting some or all built-in packages. Is it possible to do somehow, and will this ability added in future?

like image 544
Mirzhan Irkegulov Avatar asked May 13 '12 15:05

Mirzhan Irkegulov


People also ask

How to install or delete an Emacs package?

You can not install or delete in emacs package management. You can just delete the package under elpa directory directly. Then the emacs package works again.

What is use-package in Emacs?

Use-package is a popular package to organize your Emacs configuration and load your installed packages efficiently. According to the official README, use-package is a macro that allows you to isolate package configuration in a way that’s both performance-oriented and tidy.

How do I delete all installed packages from the list?

The command package-menu-mark-delete (key 'd') followed by package-menu-execute (key 'x') worked for me. Show activity on this post. I've noticed that all the installed packages end up at the bottom of the list.


2 Answers

Emacs should start and be useable even if the whole lisp directory is empty (note that we rarely/never test it, so I don't guarantee that it'll work, but at least in principle it should and if it doesn't you should report it with M-x report-emacs-bug). So feel free to remove any and all packages in there you don't find useful, in order to create a trimmed-down version of Emacs.

like image 131
Stefan Avatar answered Sep 22 '22 11:09

Stefan


You could just remove the elc files of all of the packages you want.

For example, in the version of emacs located in the ubuntu repository the tetris package is located in:

/usr/share/emacs/23.3/lisp/play/tetris.elc

If you move or remove it, emacs will continue to work, but you won't be able to play tetris anymore.

like image 45
Leif Andersen Avatar answered Sep 20 '22 11:09

Leif Andersen