Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have an account on a remote GNU+Linux system that I use via SSH, I have no root access to the machine. Sometimes I need more software or newer versions than provided by system administrators, so currently I install everything I need by hand in ~/opt directory, but it's getting hard to maintain as number of packages installed increases. Is there any package manager (like apt, yum, portage) that can install stuff in my home directory instead of root?

share|improve this question
up vote 1 down vote accepted

I was looking for a similar thing recently, and found this blog post [1], which mentions using gentoo-prefix and nix prefix


share|improve this answer
gentoo-prefix is perfect, just what I was looking for! – Marek Sapota Mar 24 '11 at 8:17

Is there any package manager (like apt, yum, portage) that can install stuff in my home directory instead of root?

While both yum (and rpm) and apt are able to install into an alternate root directory, I suspect that they still assume that they are running as root and will probably fall over and die in interesting ways if you try to run them as a non-root user.

You can simply extract files from packages into your home directory:

cd ~/mypackages
rpm2cpio /path/to/somefile.rpm | cpio -ivd

You can do the same thing with dpkg files through appropriate use of ar and tar.

There are package managers designed to do exactly what you want (e.g., epkg), but you won't actually find packages pre-built for you. These are great for managing your own collection of software if you build and install from source.

I'm going to add that your system administrators will probably frown on this. If you need more recent versions of software, you should probably work with your admins to get the resources you need or you should consider running your own development environment.

share|improve this answer

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.