0

In arch based system pacman -r/ --root can be used to provide an alternate root to install packages. This sometimes can be a solution to installing package at different location/ partition, dependency conflict etc.

So I'm wondering if there exists any similar solution for debian based systems?

1 Answer 1

3

Yes, both tools have an equivalent (based on your description): dpkg’s --root option, and apt’s RootDir setting. Both of these change the root directory (temporarily) for everything used by the tools, including configuration, state, package information etc.; they’re intended more for manipulating a mounted system in its entirety, than for installing an individual package in a different location. See the dpkg and apt.conf manpages for details.

To change RootDir, use apt’s -o option:

apt -o RootDir=/foo ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .