Is it possible to install a .deb package completely under my home directory at debian?

  • You could build a deb package that installs anywhere. But why would you want to? Packages are supposed to be installed into the system. Jul 24, 2011 at 16:30
  • 7
    @Faheem Mitha - We don't all have root access to our Unix boxes you know, I certainly don't where I work. If we need a package (RPM in my case) to use some piece of software, it would be nice if we could install it in user space rather than have to speak to I.T. and get them to install the package on the system for us.
    – Mark Booth
    Jul 25, 2011 at 12:26
  • @FaheemMitha Another thing is testing a new version of a package. If I want to make a specific package available to one user only I don't go on installing it system-wide.
    – Erathiel
    Aug 21, 2015 at 11:59
  • @Erathiel Well, that's really a use case for a virtual machine. Aug 21, 2015 at 15:06
  • @FaheemMitha Maybe or maybe not ;) My use case was a development machine with several users serving as development environments. I needed to bump a package to a new version for one specific user only, so that we could test how the new version behaves. But the server is a virtual machine itself, so you're partly right ;)
    – Erathiel
    Aug 24, 2015 at 12:01

3 Answers 3


It depends what you mean by "install". It is possible to extract the file contents of a .deb file using dpkg-deb -x <filename.deb>, but whether you can actually use the software after extracting it locally depends on how it is written. A lot of Linux software will be expecting to find its resource files in standard locations specified at compile-time, such as /usr/share or /usr/lib, which will fail if the software is not installed in the usual location. Also any system-wide configuration files installed by the package, such as .desktop files that create entries in the start menu, will not function as intended if installed in the wrong location.

  • 3
    it should be dpkg-deb -x app.deb /path/to/target/dir/
    – qed
    May 10, 2013 at 22:21
  • or just dpkg -x app.deb /path/to/target/dir/ May 7, 2015 at 18:42

Thanks for all your comments an answers. It was a self-packaged piece of software where I would like to make some basic checks if my packaging was correct. I am root on my computer but wouldn't like to do a real installation there nor want to use a virtual image for the moment. I came up with this solution: https://serverfault.com/questions/23734/is-there-any-way-to-get-apt-to-install-packages-to-my-home-directory Which perfectly works for me atm.

  • 7
    @Ivogel asks "The page you linked to has many posts, and I can't tell which one is the solution that worked for you. Could you please specify?"
    – drs
    Nov 12, 2014 at 13:41

Note that use of the Debian package system requires root access. So, installing a deb package in a users home directory requires root access. If you have root access, then makes more sense to just install into the system as normal.

If you don't have root access, you can't use the Debian packaging system. You could certainly unpack a deb file into its component pieces and stick it in your home directory, but doing so would make little sense imo. I suggest you go with a local install. Depending on what software you are installing,the software may have some sort of internal package management system you can use.

  • I don't know if it was added afer this answer was created but dpkg has a --force-non-root option which can be used to get around this. Nov 3, 2017 at 14:32
  • @BruceAdams I don't see this option listed on the man page. Can you provide a reference? Nov 3, 2017 at 15:36
  • If you run dpkg --help it mentions --force-thing. If you run dpkg --force-help it gives more details. See for example askubuntu.com/questions/193695/… Nov 3, 2017 at 16:07
  • @BruceAdams Ok, I see it, but I have no idea how it would work: not-root Try to (de)install things even when not root. Nov 3, 2017 at 18:09
  • See my question stackoverflow.com/questions/47099045/… However, at the time of writing it doesn't yet have an answer. So I have no idea either. Nov 6, 2017 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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