Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

How do I remove a program that I have compiled from source using the ./configure; make; make install method? Does it matter whether I have kept the original directory that the source was stored in or not?

share|improve this question
    
make uninstall? But you need to keep Makefile. –  Eddy_Em Feb 14 '13 at 5:54
1  
You don't really need to keep the makefile if you've just done a straight configure, you can just configure again and make uninstall. –  TAFKA 'goldilocks' Feb 14 '13 at 7:09
    
Install them with a custom prefix/DESTDIR into your home directory; do not let the makefile run as root. If using a Debian or Redhat-based Linux flavor, better still, use fpm and the package manager shipped with the distro. –  Deer Hunter Feb 14 '13 at 18:51
add comment

marked as duplicate by Gilles, Renan, uther, jasonwryan, rahmu Feb 15 '13 at 1:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

There are a couple of approaches that you can pursue.

  1. Re-run ./configure with the same options you originally passed to it and then run make uninstall. If you no longer have the original files, re-download the tarball of the corresponding version and use that.
  2. Use find or locate to track down the relevant files (only really practicable for smaller programmes) and remove them manually.

To avoid this scenario again, you could always look at a tool like checkinstall for building from source and tracking the installed files; it was developed for precisely this reason:

A lot of people has asked me how can they remove from their boxes a program they compiled and installed from source. Some times -very few- the program's author adds an uninstall rule to their Makefile, but that's not usually the case. This is my primary reason to write CheckInstall. After you ./configure; make your program, CheckInstall will run make install (or whatever you tell it to run) and keep track of every file modified by this installation.
share|improve this answer
1  
Disagree with Mr. CheckInstall vis, "sometimes -very few- the program's author adds an uninstall rule". Some of them don't, but I think most of them do. They've already had to deal with their own tish over and over again, which is a pretty good motive. –  TAFKA 'goldilocks' Feb 14 '13 at 7:11
    
Best bet is to create a proper package for your system. That way the package manager is aware of the program, tracks dependencies, and can uninstall cleanly. –  vonbrand Feb 14 '13 at 14:31
add comment

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