Uninstalling Emacs on OS X (Snow Leopard)

13,906

Depending on how your versions of emacs were built, there are two different procedures.

If you built an OS X app (Emacs.app), all you should need to do is drag the app to the trash. All of emacs' support files are contained withing the app

If you just have an emacs binary sitting around, you need to delete that and the corresponding support files. For instance, the emacs binary that comes with OS X is in /usr/bin/emacs, and its support files are in /usr/share/emacs. The contents of the second directory should contain subdirs named site-lisp and named after version numbers (e.g., 22.1). If you want to be complete, you might want to search your disk for directories named site-lisp to make sure you found everything.

As a side note, the version of emacs that is available through MacPorts now seems to be pretty good. I've been using it for a while, and haven't had any major issues.

Share:
13,906
Ricardo
Author by

Ricardo

Updated on September 17, 2022

Comments

  • Ricardo
    Ricardo almost 2 years

    I have several versions of Emacs installed in my system, some of which do not work, and I would like to get rid of all but one (or maybe all of them and then start from scratch again). I tried looking for instructions on how to uninstall Emacs and, suspiciously enough, didn't find any. So the question is, how do I uninstall Emacs?

    More background info: I have macports installed, but didn't install Emacs through there; I compiled it from source (several times). For that I've used curl and cvs at different times to get the sources. I also tried with the binary from the emacs-for-mac-os-x site, but it won't let me copy it, after extracting it, to the Applications folder. Aquamacs has not been an option and I don't mind keeping it that way.

    Any and all help is appreciated!

    • Doug Harris
      Doug Harris almost 14 years
      I'm curious about the problem you've had with the binary from emacsformacosx.com. That's what I use and haven't had any problems with it. It runs from Applications and uses its copies of the emacs lisp files. I've never had a need to uninstall the emacs that came with Snow Leopard.
    • mmmmmm
      mmmmmm almost 14 years
      Why is Aquamacs not and option? - it works
    • Doug Harris
      Doug Harris almost 14 years
      I don't know about Ricardo, but I found that Aquamacs is not a good option for old Emacs people who are new to OS X. It tries to hard to be mac-like and not emacs-like. Further discussion in this question: superuser.com/questions/138835/…
    • Ricardo
      Ricardo almost 14 years
      @Doug Harris: When I double click the .dmg file it opens up the window that lets you drag the Emacs.app into the Applications folder. When I drag it there, it first warms me that I am about to replace a newer file Emacs.app with an older one. I okay this and then I get an error saying "The operation can’t be completed because you don’t have permission to access some of the items." Also, this is the first time I've ever had the need to uninstall Emacs. I'm getting the feeling that once you start with it, it stays forever in your system.
    • Ricardo
      Ricardo almost 14 years
      @Mark: I'm new to OS X and (somewhat) old to Emacs. It's purely a matter of preference... I kind of like the clunky look of Emacs.
    • Doug Harris
      Doug Harris almost 14 years
      @Ricardo - When you get the "The operation can't be completed..." message, is there an option to authenticate as a privileged user? (This is OS X's graphical UI on sudo). Perhaps the old Emacs.app has some weird permissions. Since it sounds like you know your way around a command line, try going into terminal and doing sudo rm -rf /Applications/Emacs.app to forcibly remove the old one.
    • Ricardo
      Ricardo almost 14 years
      No authentication or anything. I even tried to unpack the .dmg through the command line, but that failed too (couldn't recognize the package or something like that). I had already deleted the Emacs.app by dragging it into the Trash; it asked me to authenticate. I still ran the sudo rm -rf /Applications/Emacs.app (for good measure) and nothing happened, as expected.
    • nimrodm
      nimrodm almost 14 years
      If it's a mac application, "AppCleaner" (freemacsoft.net/AppCleaner) does the job nicely.
  • Ricardo
    Ricardo almost 14 years
    Thanks Keith. I dragged the Emacs.app from the Application folder into the Trash. It requested authorization to delete, which I gave. That took care of Version 23.2 (9)!!! At least according to when I right-click a .el file. I still have seven (7) different site-lisp directories and versions 23.1.90 and 24.0.50 available, the latter as default. They both seem to work ok.
  • Ricardo
    Ricardo almost 14 years
    The paths are: 1. /opt/local/share/emacs/site-lisp/ 2. /opt/local/share/emacs/23.2/site-lisp 3. /Developer/usr/share/emacs/site-lisp 4. /opt/local/var/macports/software/emacs/23.2_2/opt/local/shar‌​e/emacs/site-lisp 5. /opt/local/var/macports/software/emacs/23.2_2/opt/local/shar‌​e/emacs/23.2/site-li‌​sp 6. /opt/local/var/macports/software/libidn/1.19_0/opt/local/sha‌​re/emacs/site-lisp 7. /Users/ricardo/Desktop/temp-emacs/emacs/site-lisp/ The last one has a 'CVS' folder as a subdirectory.
  • Ricardo
    Ricardo almost 14 years
    Oh, and apparently I installed the Macports version. I thought I had not.
  • Ricardo
    Ricardo almost 14 years
    I went ahead and deleted paths 1, 2, 3 and 7 (not the whole tree, just the relevant branches); sudo port uninstall emacs took care of cleaning up paths 4 and 5. Path 6, with its libdin contents seems important, so I won't manually delete it. After all this, I reinstalled the binary from the emacs-for-mac-os-x, and this time it installed without a glitch. I finally have emacs again! The icon on the Dock's Applications folder is non-descript, but I can live with that. The icon in the Dock is as it should be. Thanks for all the help!