Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know if there is any way that I can make apt-get to install packages in a directory other than /usr/bin. Say I want apt-get to install all the packages from now on to /software. Its this possible in anyway ? I want something to work like --prefix option that we use while compiling source.


share|improve this question

You can use dpkg instead of apt-get which will give you more options.
One of the option is to specify an installation directory. You can execute sudo dpkg -i file.deb --instdir=destdir where destdir is your desired installation directory.

share|improve this answer
doesn't help :(. dpkg: error processing --instdir=/usr/xx (--install): cannot access archive: No such file or directory $ ls -l /usr/xx/ total 0 – piro Apr 2 '12 at 12:43
Does the folder /usr/xx exists? – Tiago Carrondo Dec 12 '13 at 22:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.