Keeping Ubuntu backports pinned away

I’ve been keeping the entries for Ubuntu backports in my sources.list for a long time now. They always been commented out though, since I don’t really trust them enough to keep my system up to date with backports. It wasn’t very elegant though so I decided to see if pinning could do the trick. After an email to the Ubuntu user list my /etc/apt/preferences now look like this:

Explanation: Make sure backports is not installed be default
Package: *
Pin: origin ubuntu-backports.mirrormax.net
Pin-Priority: 499

This means that I can keep the backports’ entries in sources.list enabled without being bothered with updating the entire system when doing an apt-get upgrade.

There’s only a minor detail—update-notifier thinks that there are updates available, but once I click it no upgrades are found. I guess there are two pieces of code that checks for upgrades, one doesn’t handle pinning and one does.

[Edited] It seems my whinging about update-notifier's inability to handle pinning was a little premature. It seemed it just needed some time to adapt. Now it’s correctly respecting my whishes not to upgrade any packages available in backports.

Ubuntonista

But…

Wouldn’t this mean that you end up not using the backports to get more up-to-date versions of software (Which is really what the backports are for)?

What/How do you use the backports after making the change you have just described? Do you get to selectively upgrade some packages using the backports version or something?

I will be glad if you could explain this - I am a newbie :)

Magnus

Ubuntonista,

You’ve got it right, I don’t get the backports packages unless I ask for them explicitly. The easiest way is to use synaptics and force a version.

Leave a comment