[Gllug] How to uninstall?

Richard Jones rich at annexia.org
Sun Jul 25 14:12:30 UTC 2004


On Sun, Jul 25, 2004 at 02:58:24PM +0100, Sharon Kimble wrote:
> I've downloaded several programs to evaluate off the net, compiled and
> installed, used them and then decided that I don't like them. Now I want
> to get rid of them, i.e. uninstall them, but how please?
> 
> I've tried 'install clean' which didn't work, I've looked at the cli
> options for install and that didn't help either. I know that I can just
> delete the folder that the programs source is in but that doesn't get
> rid of any links.
> 
> I know as I'd installed storix to have a look at, and then just deleted
> its folder to get rid of it, and now everytime that I boot I can see
> that its still looking for the storix daemon.

The details are a little limited, but it sounds as if you installed
from source using something similar to:

./configure
make
sudo make install

In this case uninstallation can be quite hard.  It make be that the
Makefile provides an uninstall rule, in which case you could do:

sudo make uninstall

This might not work however, in which case you have a problem.  It is
possible to identify which files were installed, and remove them
manually.  The way to do this is to install again, in a separate
directory, and then examine the installed files, and remove the "real"
ones.  You can do this with:

mkdir /tmp/install-tmp
make DESTDIR=/tmp/install-tmp install

(cd /tmp/install-tmp && find . -type f)   # will give you the list of files

Then remove those files by hand.

What can you do in future to make uninstalls easier?  There are
various approaches:

(0) Don't reckon on uninstalling - only install things you know you'll
want.  Other things can be run from the source directory without
installing.

(1) Use a package system instead of building from source (!)  Debian
APT or RPM YUM/APT manage the binary files for you, and will even
manage upgrades.  If you want to use a package system, and build from
source, take a look at Gentoo.

(2) Install with a prefix directory.  For instance you could do:

mkdir $HOME/myprogram
./configure --prefix=$HOME/myprogram
make
make install

This will install everything under $HOME/myprogram (eg. the binary
will typically be in $HOME/myprogram/bin etc.)  You may need to adjust
your $PATH and $LD_LIBRARY_PATH appropriately, but at least you'll be
able to nuke the install cleanly just by doing 'rm -r $HOME/myprogram'.

Also this has the advantage that you don't need to be root to install
(note: no 'sudo' before the 'make install').

(3) Remember what files were installed, and remove them by hand.
(Sort of 'DIY package system' - not really very practical or easy in
reality).

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list