Tag Archives: Ubuntu

Debian Backports on Ubuntu

So over the last few days I decided that I wanted to upgrade my distro from Ubuntu 10.10 to something a bit newer. I like that debian has tons and tons of packages available to them…..add their backports repo and you have tons of new┬ápackages too!

After trying the latest Fedora 15, Debian Testing (wheezy), Xubuntu 11.04 and Ubuntu 11.04 I settled back to the tried and true Ubuntu. I’m not really digging this whole unity interface (which is why I put off the upgrade to 11.04 for so long) but I’ll deal with it.

The only thing missing from the equation were lots of new packages…..so I decided to add the debian-backports repo to my ubuntu install:

Create /etc/apt/sources.list.d/debian-backports.list with the following contents:

deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
deb-src http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

Add this in /etc/apt/preferences.d/debian-backports

Package: *
Pin: origin backports.debian.org
Pin-Priority: 100

Finally, run this:

sudo apt-key adv --recv-keys --keyserver hkp://subkeys.pgp.net AED4B06F473041FA
sudo aptitude update

So what the hell does all this do exactly?

  1. We added a new repo to our package manager…standard issue…
  2. We “pinned” the packages from the debian-backports repo to be very low priority. We don’t want them being pulled in because they are potentially unstable and untested. So we want to prioritize tested, stable ubuntu packages first.
  3. We have to import the key for the debian-backports repo because it doesn’t come standard in the keyring
Now if you want to install a new package from the repo you have two choices
sudo aptitude <package>/squeeze-backports
sudo aptitude -t squeeze-backports <package>
If you want to see what versions of a package are available, just run this:
aptitude versions <package>