How it works

Let foo-1.1 be a pakage that installs (via 'make install') following files:

	/usr/lib/ ->

(I assume it was configured with --prefix=/usr) Removing this from the system is not easy if you have no such list. Say, you can't tell that magic-numbers in /usr/share belongs to foo-1.1 unless you really know that package well. For most packages in system that isn't so.

Let's change it in following way:

	/usr/pkg/foo-1.1/lib/ ->

	/usr/bin/foo -> ../pkg/foo-1.1/bin/foo
	/usr/lib/foo -> ../pkg/foo-1.1/lib/foo
	/usr/lib/ -> ../pkg/foo-1.1/lib/
	/usr/lib/ -> ../pkg/foo-1.1/lib/
	/usr/man/man1/foo.1 -> ../pkg/foo-1.1/man/man1/foo.1
	/usr/share/magic-numbers -> ../pkg/foo-1.1/share/magic-numbers
It's now easy to remove foo-1.1 from the system: just rm -fr /usr/pkg/foo-1.1, and only some dead symlinks will remain. Removing them isn't a hard task also.

Now one can tell what is pkg. It's just a set of utilites (usually bundled in a single executable) to maintain such structure.