Take ibus-sunpinyin for example, which isn't existed in the squeeze release. I'm not going to switch the whole system to the sid branch, so, I want to download the single package from sid repository and install it like:

# Add the sid repository
sudo mv /tmp/sid.list /etc/apt/sources.list.d/

# Error: can't install because version conflicts of libc6:
#     sudo apt-get install ibus-sunpinyin

# This is ok but it will upgrade a lot of mess from sid branch:
#     sudo apt-get upgrade ibus-sunpinyin

# So, instead of apt-get install/upgrade, let me download & install the single package.
# However, this errored again because of version conflicts of libc6:
#      apt-get install --download-only ibus-sunpinyin


# Remove the sid repository.
sudo mv /etc/apt/sources.list.d/sid.list /tmp

# Install the single package.
sudo dpkg -i ./ibus-sunpinyin-x.x.x.deb
  • To download a single package: you can apt-get download ... (for apt-get 0.8.11+), or aptitude download .... However, I'm also failed to sudo dpkg -i ibus-sunpinyin-x.x.x.deb due to sid dependencies.
    – Lenik
    Aug 23, 2011 at 6:04

5 Answers 5


You can also try downloading the source packages from the sid repository, and build them on your squeeze system. You might run into trouble if there are a lot of dependencies, or if the package depends on a version of a library that is not available in squeeze.

If this works, then you don't need to maintain another distribution in a separate folder, as you would with the bootstrapped approach.


What you REALLY want is to learn about apt-pinning. http://jaqque.sbih.org/kplug/apt-pinning.html

  • You need this if the package you want has no backport. Otherwise I would wager backports generally function better.
    – d-_-b
    Jan 3, 2014 at 1:40
  • 1
    Yeah. Backports are a much safer bet. Apt-pinning will not always work and will sometimes pull way more than you want (nobody will want to help if you pull libc6 from sid!)
    – Rob
    Jan 9, 2014 at 14:07

The easy way is to set preferences so that the system uses stable for most packages but falls back to testing or unstable for missing packages.

Here are the steps:

  1. Add this to /etc/apt/sources.list:

     deb http://deb.debian.org/debian buster main
     deb http://deb.debian.org/debian testing main non-free contrib
     deb http://deb.debian.org/debian unstable main non-free contrib
  2. Write this to /etc/apt/preferences (or create the file)

     Package: *
     Pin: release a=stable
     Pin-Priority: 700
     Package: *
     Pin: release a=testing
     Pin-Priority: 650
     Package: *
     Pin: release a=unstable
     Pin-Priority: 600
  3. Run apt-get update

  4. Install the package you want (e.g. apt-get install ibus-sunpinyin)

PS: You can force the installation of an unstable package with apt-get install <package>/unstable

  • this marks 18 packages as updateable for me, meaning the priorities seem to be ignored...
    – xeruf
    Feb 5 at 18:51

This package is available in Debian Backports, which will make your life a lot easier. These are generally packages pulled from testing or unstable (sid), and "backported" to the current stable release.

Add this line to your sources.list

deb http://backports.debian.org/debian-backports squeeze-backports main

then run:

apt-get update && apt-get -t squeeze-backports install ibus-sunpinyin

One way to work around this is to use cdebootstrap to install a basic sid system, then use chroot to run the program you need within the new system.

cdebootstrap installs a new debian system from whichever distribution you want in a directory. Then, chroot lets you run programs in that other distribution without rebooting or anything.

You can also use mount --bind to let the chrooted system access your home folder, /proc, etc.

From within the chrooted system, apt-get will install from the sid repository.

For a more detailed explanation, see https://wiki.ubuntu.com/DebootstrapChroot.

You must log in to answer this question.

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