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 use sudo apt-get purge emacs. But it says Emacs has not been installed and will not be removed. But I can run Emacs by typing emacs in the terminal. Also the command which 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.
9 Answers
You haven't installed Emacs with the package manager. As you have installed it from source tarball, try this way.
Check emacs version.
$ emacs --versionDownload the same emacs version you have installed in the past.
$ wgetExtract tarball.
$ tar xJvf emacs-$VERSION.tar.xzRun ./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 $ ./configureDo make uninstall to uninstall.
$ sudo make uninstall
Enjoy!
It is not enough to
sudo apt-get remove emacsYou have to do
sudo apt-get remove emacs emacs23 emacs24 emacs25 emacs26 \ emacs-bin-common emacs-common emacs-el Then
locate emacs 2 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 emacsit will list all it footprints in the system , then remove those emacs footprints by using rm command carefully.
4For me removing emacs-gtk worked
sudo apt-get remove emacs-gtk 1 Using checkinstall
- Close all package managers
- Download the archive again
- Compile emacs again
Install the package checkinstall
sudo apt-get install checkinstallInstall emacs with
sudo checkinstallto 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.
sudo apt remove --purge emacs-bin-common emacs-el emacs-gtkThis command worked for me
I tried this and worked for me :
- Go the emacs installed Icon in the apps:
- Click the right button > Show Details
- Click on the uninstalled button.
- Go to terminal > emacs--version.
- Nothing is there.
- Enjoy.
Using apt
sudo apt remove emacsfollowed by
sudo apt autoremovethis will remove both emacs-terminal and emacs-GUI
This worked for me to uninstall emacs which was installed through ppa:kelleyk/emacs.
I initially tried
sudo apt purge --autoremove emacs$VERSIONit removed some emacs files but the emacs itself does not removed. when I went to my terminal and do emacs --version, I can still open emacs.
I then reinstalled emacs$VERSION once more
sudo apt install emacs$VERSIONthen again purged the emacs
sudo apt purge --autoremove emacs$VERSIONNow its completely removed.