Uninstall programs in Linux

Leo Cacciari leo.cacciari at gmail.com
Sat Nov 24 20:07:37 UTC 2007


Il giorno sab, 24/11/2007 alle 20.28 +0100, Mario Vukelic ha scritto:
> On Sat, 2007-11-24 at 20:55 +0300, OOzy Pal wrote:
> > Hi
> > 
> > How do you usually uninstall programs compiled from source
> > (configure/make/make install) in Ubuntu?
> 
> If the makefile provides no uninstall target (make uninstall), then you
> are basically out of luck and need to track the files yourself (note
> which files are installed by "make install". You can prevent this by
> doing "checkinstall make install" instead of a plain "make install" in
> the first place. This will create a *.deb package that you can install
> with dpkg or gdebi, and which is tracked by the package manager. To
> uninstall you then can use the same commands as when uninstalling other
> packages. Check the manpage of checkinstall.

The difficulty in "keeping track" of installed files is what makes stow
so useful. Basically, it allows you to keep all the file belonging to a
program under a directory... Thus for installing a software foobar, just
configure with 

./configure --prefix=/usr/local/stow/foobar
make
sudo make install
cd /usr/local/stow
sudo stow foobar

Now, foobar is accessible just as if you had installed it
under /usr/local eg. you have a symbolic link 

/usr/local/bin/foobar -> /usr/local/stow/foobar/bin/foobar

Now, for uninstall, simply do

cd /usr/local/stow
sudo stow -D foobar
sudo rm -rf /usr/local/stow/foobar

et voila :)

-- 
Leo "TheHobbit" Cacciari


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa รจ una parte del messaggio	firmata digitalmente
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20071124/b5c48b0d/attachment.sig>


More information about the ubuntu-users mailing list