From the Magit docs:

Furthermore the old dependencies git-commit-mode and git-rebase-mode have to be removed because they are no longer used by the 2.1.0 release and later, and get in the way of their successors git-commit and git-rebase.

I have a lot of machines that have these old packages lying around. Is there any way I can teach magit to automatically clean them up?


2 Answers 2


This should be your package manager's duty, not magit, if you are using package.el on Emacs 25, you can try package-autoremove. From C-h f package-autoremove:


Remove packages that are no more needed.

Packages that are no more needed by other packages in ‘package-selected-packages’ and their dependencies will be deleted.

There is a post from Artur Malabarba on this: http://endlessparentheses.com/new-in-package-el-in-emacs-25-1-better-dependency-management.html

  • I'm not saying it's magit's job, just that I want the packages to be removed automatically somehow. Emacs 25 is, unfortunately not an option. There are Debian boxes running 24.4.
    – PythonNut
    Nov 6, 2015 at 5:24

https://stackoverflow.com/questions/20541322/how-to-remove-installed-elpa-package suggests simply removing the package directories from your disk.

package-delete is undocumented in Emacs 24, but seems to do the same thing (as well as removing any .signed file corresponding to the deleted package).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.