Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 would like to use the Natty Narwhal repository for puppet packages, but I don’t want to upgrade my whole server. Is that possible ?

My current solution is to fetch the .deb packages by hand

share|improve this question

migrated from Feb 23 '11 at 7:06

This question came from our site for professional and enthusiast programmers.

What you want is something called 'pinning' , I'm sending this over to Ubuntu SE where you stand a better chance of getting help. – Tim Post Feb 23 '11 at 7:05

Pinning is an advanced package management technique that allows you to remain on a stable release while grabbing packages from a more recent version. Mixing repositories is not supported, and can get you into trouble if the package you want has been compiled against different library versions than you have on your system. If possible, you should try getting the package from the backports repository (or possibly a well supported PPA) first. That said, you seem to already know that puppet from Natty works well on your system.

In order to pin puppet to the natty version, we will have to edit a few files. First you will need to set your default release in /etc/apt/apt.conf.d/01ubuntu (I'm assuming you are using lucid, obviously substitute the actual release):

Default-Release "lucid";

Next, you need to add natty to your /etc/apt/sources.list or create a the new file /etc/apt/sources.list.d/natty.sources.list with the following sources:

deb natty main restricted universe multiverse
deb-src natty main restricted universe multiverse

deb natty-updates main restricted universe multiverse
deb-src natty-updates main restricted universe multiverse

deb natty-security main restricted universe multiverse
deb-src natty-security main restricted universe multiverse

Then, you need to set the "Pin-Priority" for the puppet package from Natty higher than the priority for your default release. Setting the default release in /etc/apt/apt.conf.d/01ubuntu essentially sets the priority for all packages originating in that release to 990. So in /etc/apt/preferences we need to over-ride this for puppet, using something higher like:

Package: puppet
Pin: release n=natty
Pin-Priority: 995

Now you simply need to run and apt-get update && apt-get upgrade

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.