1

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. Thanks.

2
  • 1
    apt-get will only detect emacs if it's been installed by apt-get. Why do you want to remove emacs now ?
    – Lawrence
    Nov 15 '13 at 1:58
  • @Lawrence: Because I am short of disk space and I decide not to learn emacs in the near future. Vim is used. Nov 15 '13 at 2:34
0

Get the source files again(same version), unpack and try

make uninstall

This should remove all files, which have been installed by your previous

make install

In general, you have to do symmetrical actions when installing and removing software packages. apt-get can only remove packages which have also been installed with it. it does not know anything about your manual emacs installation.

1
  • Thanks. Good for removing completely and saving my efforts to search files to be deleted. Using make uninstall is the standard way to remove files. Nov 24 '13 at 3:11
0

If you try sudo make -n install, where the -n option means that nothing will actually be executed, it will go through a dry run, allowing you to see what make install did when you originally installed emacs. You can then go through and manually remove what you need to.

1
  • Thanks. It's a good method. But that requires me to download source file and do configure and make again. A little inconvenient. Nov 15 '13 at 6:45
0

Install emacs again under a different location, say /tmp/emacs, then just generate the list of files under that location and delete each corresponding location under /usr/local.

1
  • Good method. But like the one suggested by @denmch, a little inconvenient. Maybe I will choose to manually delete emacs-related files under the installation path. But Still thanks. Nov 15 '13 at 6:54
0

Remove everything obviously emacs-related under /usr/local. If you use ls -lt to sort the file list by time it might help you to identify the files. In addition to the emacs executable, there is a directory under either /usr/local/share or /usr/local/lib.

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.