How to completely remove my Emacs?
Solution 1
apt-get can not detect the applications which you have installed from source.Actually every source file will have uninstall script also but unfortunately you have removed the source file.
You may still do this. In the terminal type as
locate emacs
it will list all it footprints in the system , then remove those emacs footprints by using rm command carefully.
Solution 2
You haven't installed Emacs with the package manager. As you have installed it from source tarball, try this way.
Check emacs version.
$ emacs --version
Download the same emacs version you have installed in the past.
$ wget https://ftp.gnu.org/gnu/emacs/emacs-$VERSION.tar.xz
Extract tarball.
$ tar xJvf emacs-$VERSION.tar.xz
Run ./configure to generate the make file. If you remember the option you have given when you install it, add those command line flags, too. (e.g. --with-x=no)
$ cd emacs-$VERSION $ ./configure
Do make uninstall to uninstall.
$ sudo make uninstall
Enjoy!
Solution 3
It is not enough to
sudo apt-get remove emacs
You have to do
sudo apt-get remove emacs emacs23 emacs24 emacs25 emacs26 \
emacs-bin-common emacs-common emacs-el
Then
locate emacs
Solution 4
For me removing emacs-gtk worked
sudo apt-get remove emacs-gtk
Solution 5
Using checkinstall
- Close all package managers
- Download the archive again
- Compile emacs again
Install the package checkinstall
sudo apt-get install checkinstall
Install emacs with
sudo checkinstall
to overwrite you previous installation and to have a deb package. That's the trick.
Remove the emacs package, the command is shown after the installation via checkinstall.
Related videos on Youtube
Comments
-
Yang Wenhao over 1 year
I downloaded Emacs source files, and installed it using
make
. After installing Emacs successfully, I manually removed the downloaded source files to save disk space. Now I want to remove Emacs and I tried to usesudo apt-get purge emacs
. But it says Emacs has not been installed and will not be removed. But I can run Emacs by typingemacs
in the terminal. Also the commandwhich emacs
shows the result/usr/local/bin/emacs
.Why can't
apt-get
detect it? How can I remove Emacs completely in this situation? My OS is Ubuntu 12.04, and my Emacs version is 24.3.1. -
Yang Wenhao over 10 yearsSo I should keep the source file in order to remove the application in the future. When I decide to remove it, I run
make uninstall
, and then delete the downloaded source file. Is that right? Should I runmake clean
aftermake uninstall
? -
Thomas Ward over 10 years@YangWenhao It may be
make remove
or some other command, but yes, when you install software from source, you need to keep the source code around so you can domake uninstall
or similar to remove the software. Source-built software isn't managed by the packaging system because it's not existing as a Debian package. -
Yang Wenhao over 10 years@ThomasW. Thank you for your help. I know the right way.
-
Steven K over 10 years
locate emacs
will not "list all it footprints in the system", it will simply show you files which have 'emacs' in the name. With a program as large as emacs, many of the added files likely don't have 'emacs' in the name or path. -
deadfish over 5 years+
emacs24
too -
haziz over 4 yearsI am not sure this would help or apply to the OP. It looks like he compiled and installed from source.
-
wbadry almost 3 yearsThank you so much. This was exactly my problem.