Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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.

share|improve this question

4 Answers 4

up vote 0 down vote accepted

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.

share|improve this answer
So 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 run make clean after make uninstall? – Yang Wenhao Nov 15 '13 at 2:50
@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 do make 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. – Thomas W. Nov 15 '13 at 3:06
@ThomasW. Thank you for your help. I know the right way. – Yang Wenhao Nov 15 '13 at 6:04
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. – Steven Kath Nov 16 '13 at 20:05

It is not enough to

sudo apt-get purge emacs

You have to do

sudo apt-get purge emacs emacs23


locate emacs

keeps silent :-)

share|improve this answer

You haven't installed Emacs with the package manager. As you have installed it from source tarball, try this way.

  1. Check emacs version.

    $ emacs --version
  2. Download the same emacs version you have installed in the past.

    $ wget$VERSION.tar.xz
  3. Extract tarball.

    $ tar xJvf emacs-$VERSION.tar.xz
  4. 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
  5. Do make uninstall to uninstall.

    $ sudo make uninstall


share|improve this answer

Using checkinstall

  1. Close all package managers
  2. Download the archive again
  3. Compile emacs again
  4. Install the package checkinstall

    sudo apt-get install checkinstall
  5. Install emacs with

    sudo checkinstall

    to overwrite you previous installation and to have a deb package. That's the trick.

  6. Remove the emacs package, the command is shown after the installation via checkinstall.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.