Magit doesn't work on my system. I'd like to remove it and everything that came with it when I installed the package. How can I do this? What packages, beside Magit, were installed on my emacs when I installed Magit?

  • How did you install Magit? – xuchunyang Apr 3 '17 at 4:13
  • @xuchunyang: Through emacs' package manager, via MELPA. – Evan Aad Apr 3 '17 at 4:14
  • @Dan: Nothing, so far, because I don't want to break dependencies. First I'd like to know what got installed on my system along with Magit, – Evan Aad Apr 3 '17 at 4:31
  • If you have not done so, I would highly recommend that you report the problem you are having with Magit, as it may well be solvable. – phils Apr 3 '17 at 5:26
  • 3
    You might want to give others more time than a single day to figure out what is wrong on you system. – tarsius Apr 3 '17 at 10:29

Through emacs' package manager, via MELPA.

In which case a manual approach is:

M-x rgrep RET package-requires RET *.el RET ~/.emacs.d/elpa/ RET

That will show you the dependencies for all your packages.

C-s magit RET to check that one, and you can then look for sub-dependencies in turn.

If an earlier version of Magit had a dependency that was removed in subsequent versions, it's possible that it would now be an 'orphaned' package, as I suspect package.el doesn't attempt to detect such things. If you were really keen, and assuming you version-control your config, you could always check the dependencies over your repo history to see whether any such thing had occurred.

(Of course if you version-control your config, you almost certainly have a version-control record of what else you added when you installed or updated Magit.)

  • 6
    See package-autoremove for "orphaned packages" (requires Emacs 25.1+) – npostavs Apr 3 '17 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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