Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On a computer running "stable" Debian, when trying to install a package which is in the unstable list on the Debian web site using the "aptitude install /unstable" command, I get output similar to this:

Couldn't find any package whose name or description matched "<package>"
Couldn't find any package whose name or description matched "<package>"
No packages will be installed, upgraded, or removed.

0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.

What can I do to be able to install "unstable" packages? (I thought of adding the repository to sources.list, but I don't want everything to start being installed from "unstable").

So: how can I install unstable packages (with using "/stable" at the end of the package name)?

share|improve this question
See unix.stackexchange.com/q/112157/4671 for an in-depth answer to this question. –  Faheem Mitha Apr 11 at 1:39

1 Answer 1

up vote 17 down vote accepted

You do need to have unstable listed in your sources.list. Otherwise apt just won't find the package.

To avoid unstable packages being pulled in, you have two ways.

  • The easy way is to add a Default-Release clause to /etc/apt/apt.conf.

    APT::Default-Release "stable";
  • The hard way is to use APT preferences. In /etc/apt/preferences:

    Package: *
    Pin: release o=Debian,a=unstable
    Pin-Priority: 10

Note that for most of the lifetime of a Debian release, it's not practical to install most packages from unstable on a stable system, because they'll pull in a lot of libraries from unstable, and you'll end up with an unstable system. First look if there is a backport for them. Otherwise, if you want to install a package from unstable but not have to pull in its dependencies, try getting the source from unstable and recompiling.

apt-get source foo=1.42
apt-get build-dep foo  # pulls the dependencies of foo in stable but that's often good enough
dpkg-source -x foo_1.42.dsc
cd foo-1.42
dpkg-buildpackage -rfakeroot -us -uc -b -nc
dpkg -i ../foo_1.42_$(arch).deb
share|improve this answer
Very useful info! Thanks! –  Abbafei Feb 25 '11 at 1:18
The part about Debian Backports was basically what I wanted. Thanks alot! –  Abbafei Feb 25 '11 at 20:28
...and just now, two years later, I used the "Default-Release"! Using Debian testing/wheezy. Thanks so much for the info! –  Abbafei Jan 14 '13 at 5:52

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.