I have ubuntu 12.04

I installed emacs using below commands.

$ apt-get update
$ apt-get install emacs

Then, as expected, I could find emacs while searching in dash.

Next I wanted to uninstall emacs, so I did:

$ apt-get remove emacs

But still I can search emacs in dash. Also I am able to open emacs and use it.

However when I check below command.

sps@sps-Inspiron-N5110:~$ dpkg --status emacs
Package `emacs' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

It says emacs not installed. But how am I able to use emacs?

To correctly ask , "How to uninstall it ?"

I mean how do I get everything erased. I dont want any of these - source code (if any), or binary executable, or anything related to emacs - in my system, which was added when I did apt-get install emacs.


1 Answer 1


emacs is actually a virtual package, provided by emacs23-lucid or emacs23-nox. It's these that should be removed:

sudo apt-get remove --auto-remove emacs23-lucid emacs23-nox

The --auto-remove removes any packages which were installed to fill a dependency, but are no longer needed. In this case, it will remove packages like emacs23-bin-common.

  • I tried the command you told but I am getting this error E: Command line option --autoremove is not understood . Also I tried by removing the --autoremove option. But still I get below error E: Unable to locate package emacs24-lucid E: Unable to locate package emacs24-nox . Could you please check ?
    – sps
    Apr 3, 2015 at 5:40
  • @1Byn I made two mistakes, the option is --auto-remove with a hyphen, and the packages are numbered 23, since you're on 12.04 (which I didn't notice).
    – muru
    Apr 3, 2015 at 5:50
  • Working now. No emacs in dash either !!. Thanks. Also can you tell this "package" is a source code or executable binary ? I mean when you say a "package" in general ?
    – sps
    Apr 3, 2015 at 5:55
  • @1Byn Unless someone explicitly says "source package", "package" usually means "binary package" - but it doesn't have to be executable or even binary (such as documentation packages, software in languages like Python, packages containing common files).
    – muru
    Apr 3, 2015 at 5:58
  • An additional bit of information: If you're on Ubuntu 14.04, the package is emacs24, no suffix.
    – Tony
    Apr 21, 2016 at 11: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.