Is there any way to get APT to install packages to my home directory?

Dpkg do not have the –relocate feature that RPM has. It’s worth considering how many RPM packages support that feature though. Basically, it can’t be done.

What you could do is use a chroot if you want to test something before installing it globally on the system. To do this, you need to be able to get access to root. The first thing to do is to create a basic chroot:

# debootstrap lenny lenny-chroot

This creates a Lenny chroot inside the lenny-chroot directory.

Now we can enter the chroot:

# chroot lenny-chroot

Now we can do what ever we want and install anything without it messing up the rest of the system. When we’re done, just type exit or press ctrl-D

Leave a Comment