GNU Stow is a software package management program, written in Perl.

Basically, Stow is to /usr/local what dpkg and RPM are to /usr. Consider the following software installation scenario:

./configure
make
make install

This is the typical GNU software installation using Autotools. The "make install" will install the program under /usr/local: Binaries go to /usr/local/bin, libraries to /usr/local/lib, documentation to /usr/local/doc, manual pages to /usr/local/man...

And herein lies our dilemma: After couple of years after my Wild /usr/local Usage, I looked at some directories under /usr/local/man and found really old manpages there (I had installed equivalent software using normal package system or something, and this stuff was unused). I've found really old headers from /usr/local/include. I've found really old long unused crap from /usr/bin, something that referred to libc5. Why it was there? Well, it was too darn hard to remove.

Stow makes things much easier. Basically, to install a program, do this:

./configure --prefix="/usr/local/stow/package-1.0"
make
make install
cd /usr/local/stow
stow package-1.0

This will create appropriate symlinks to the normal /usr/local hierarchy. /usr/local/bin/package will link to /usr/local/stow/package-1.0/bin/package, and so on.

Yes, this is just a very tiny little bit more complicated than "normal" installation. However, deleting the program is now much easier:

cd /usr/local/stow
stow -D package-1.0
rm -rf package-1.0

That's it! Can't be much more easier, can it?