I have:

$ /Applications/Emacs.app/Contents/MacOS/Emacs --version
GNU Emacs 24.3.1
$ /usr/bin/emacs --version
GNU Emacs 22.1.1

How do I get rid of the second installation of Emacs?

  • 2
    This site works better if you restrict your questions to ask one thing only. Otherwise you won't be able to accept one answer if good answers to several sub-questions are spread across several answers. But there is no limit on the number of questions you can ask, so please just ask a new one for whatever has gotten dropped here and still needs answering.
    – nohillside
    Nov 7, 2013 at 20:15

2 Answers 2


The second emacs came with OS X. For files that are logged in the package database, you can use pkgutil:

$ pkgutil --file-info /usr/bin/emacs
volume: /
path: /usr/bin/emacs

pkgid: com.apple.pkg.BSD
install-time: 1382483268
uid: 0
gid: 0
mode: 555

A list of packages can be obtained via pkgutil --packages. However, note that—again—this only covers items in the package database.

You should not modify items that are part of the core operating system. If you prefer a locally-installed program to override one that came with the operating system, you should adjust your PATH to prefer that program before system paths such as /usr/bin are checked.

One way to do this is to have /usr/local/bin be first in your path and link your /Applications version of emacs to /usr/local/bin so that it will be called first unless a program explicitly calls /usr/bin/emacs


The file /usr/bin/emacs is installed as part of Mac OS X. It is generally not a good idea to change or modify files that are installed as part of the default OS installation; other programs can rely on their presence.

Utilities installed as part of the operating system can be invoked by other programs with the expectation that the version installed will match the operating system spec. Removing them or replacing them with a different version could cause other programs to fail to operate as designed.

  • I can replace /usr/bin/emac with a symlink to /Applications/Emacs.app/Contents/MacOS/Emacs, right?
    – sds
    Nov 7, 2013 at 19:29
  • 3
    @sds Not a good idea. Adjust your PATH to prefer your Emacs.app version instead.
    – zigg
    Nov 7, 2013 at 19:30
  • You want /usr/bin/emacs to invoke the default version. You can safely install your own programs in /usr/local/bin. If you want your own programs to preempt the system versions, make sure /usr/local/bin is earlier in your path than /usr/bin and /bin, but be warned that this creates a security hole if someone with admin privileges on your system installs a /usr/local/bin version of some other program with unexpected results.
    – Daniel
    Nov 7, 2013 at 19:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .