how to uninstall emacs from command line?
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
.
Related videos on Youtube
Comments
-
sps over 1 year
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. sps@sps-Inspiron-N5110:~$
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
.Thanks.
-
sps about 9 yearsI 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 errorE: Unable to locate package emacs24-lucid
E: Unable to locate package emacs24-nox
. Could you please check ? -
muru about 9 years@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). -
sps about 9 yearsWorking 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 ?
-
muru about 9 years@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).
-
Tony almost 8 yearsAn additional bit of information: If you're on Ubuntu 14.04, the package is emacs24, no suffix.
-
Admin about 7 yearsJust for info.:
sudo apt-get remove --purge --auto-remove emacs
worked fine for me.