We need to negotiate the fact that make uninstall would not always work, so below
is more of a proactive solution.
This involves the use of the paco program
which is available in the Ubuntu Software Center. Once we have installed paco,
we can use it the log mode when we "make install" a program. Paco acts like a wrapper for your "make install" and creates a log in the /var/log/paco directory with the list of files copied to various directories. Moreover, you could see the the files in the Paco Front end.
For example when I compiled php from source I did the following :
paco -lp php5 "make install"
The parameter l makes the paco run in the log mode.This created a log file in /var/log/paco named php5 (the name I have given in the command). It contained all the files which are copied to various standard locations during the install. You could use a command line editor or paco gui to view the files.
Below is the example of getting
the file list using sed command line editor
(Replace php5 with your filename).
cat /var/log/paco/php5 | sed -n 's/|\(.*\)//;/^#\(.*\)/d;p'
Once you got the list of the files, you know how to delete them don't you? Indeed, you could pass the results of the above command to rm using backticks like shown below:
sudo rm `cat /var/log/paco/php5 | sed -n 's/|\(.*\)//;/^#\(.*\)/d;p'`
Job done!
Note : Due to LD_PRELOAD limitations, paco can't follow the trace of suid programs. See man page.
checkinstall
- it makes this whole problem evaporate. – Oli Dec 12 '11 at 12:00make uninstall
work after amake clean
? I believe to need to make sure it's still ./configured'd the same way. – user606723 Dec 12 '11 at 16:10make clean
does not undo./configure
, it undomake
. The only way to "deconfigure" would be to either delete theMakefile
itself (and perhapsconfig.h
too), or run ./configure again – MestreLion Oct 02 '12 at 19:27make install
was run as root (e.g.,sudo make install
), which is typically the case, it's virtual always necessary to runsudo make uninstall
to remove the software. – Eliah Kagan Jul 09 '13 at 01:46checkinstall
because it mentions theauto-apt
which can auto resolves missing header dependencies! – Daniel Sokolowski Oct 25 '15 at 15:21make install
, you can still usecheckinstall
. Normallycheckinstall
will overwrite everything thatmake install
created. After that just usedpkg -r <package.deb>
, and everything should be removed. – user502144 Oct 15 '17 at 18:00