How to uninstall packages that are installed using ‘make install’
This stack overflow article shows different options
make clean removes any intermediate or output files from your source / build tree. However, it only affects the source / build tree; it does not touch the rest of the filesystem and so will not remove previously installed software.
If you’re lucky, running make uninstall will work. It’s up to the library’s authors to provide that, however; some authors provide an uninstall target, others don’t.
If you’re not lucky, you’ll have to manually install it. Running make -n install can be helpful, since it will show the steps that the software would take to install itself but won’t actually do anything. You can then manually reverse those steps.
+1; Watch out for files that might also have been installed by other packages. Simply deleting these files (one interpretation of “manually reversing those steps”) could break the other packages. This is (one of many reasons) why package managers were invented. – Merlyn Morgan-Graham May 10 ’13 at 0:41
this is only possible if you keep the same configured and compiled build directory right? thus not very useful since most people would delete it after install. He wants to uninstall things regardless if he kept the build folder, and regardless if the package has been correctly configured for an make uninstall option. Clarification: what he wants to do is to enable some kind of management for packages that works for things he compiled himself. – Nisse Jul 27 ’13 at 6:11
If sudo make uninstall is unavailable:
In a debian based system, instead of doing make install you can run sudo checkinstall (or .rpm etc. equivalent) to make a .deb that is also automatically installed. You can then remove it using synaptic.
This answer is proof that the best answers often don’t get a lot of up-votes. Thanks! I’ve wanted to know how to do this for a long time. I always hesitate doing a “make install” because I know it will almost certainly be a pain to remove. – doug65536 May 24 ’13 at 18:53
also the LFS book has some information on package management systems, Since you have to set it up yourself. The information there should be helpful in getting this kind of thing work better(cleaner, more general). There are scripts that simply listen to what gets installed and then creates a script that when launched deletes all those files, or something like that. – Nisse Jul 27 ’13 at 6:18
This worked beautifully for me, even though I already had run make install before using checkinstall instead. – LukeGT Mar 6 at 7:43