[Techtalk] removing installed programs
hobbit at aloss.ukuu.org.uk
Sun Oct 26 15:47:34 EST 2003
On Mon, Oct 27, 2003 at 01:31:13AM +1100 or thereabouts, Noir wrote:
> Ok, this might sound a bit stupid. But here it goes:
> When we want to un-install a program in RHL we usually use rpm -e & the
> rest is taken care of. But say we have installed a program from the source
> (gz, Z, bzip2, tar, make, makefile, etc) and now the whole file is
> scattered around the file system. Say, some files are in /usr/local/bin ||
> /usr/bin && some are in /etc/ (conf files) && yet some are in
> /etc/program_name/....|| /usr/share/doc/program_name/
> So, if we want to delete/ remove the program altogether how will we do it?
(1) Keep the original source tree.
(2) cd to where you typed 'make' and 'make install'
(3) 'make uninstall'...
...and hope the author included an uninstall target.
If you have deleted the original source tree, then I dunno. I
presume you can download the (same version of the) thing again,
and unpack it into the place it was, and then do 'make uninstall',
but I have never tried it.
This is another of those lessons learned through experience:
* Before you build something and do make install, check whether
there is an 'uninstall' target in the Makefile, just in case you
need to nuke it beforehand.
* Keep source tree around if you think you will need to remove it
'target' is a word I only hear in conjunction with makefiles.
Look at a makefile and you'll see things like 'clean', 'install',
'dist' and so on. Those are the targets. When you do 'make something'
rather than just make, it goes off and looks for the something
in the makefile. If there is a rule for it, it will follow the
instructions and do it.
I think :)
More information about the Techtalk