Tag Archives: preferences

Priorities for APT repositories (debian-based distributions)

I knew I could pin a package version, setting up an /etc/apt/preferences file, please see
here.
newtonfn on the ubuntuforums elegantly worked this resource out to set up a priority to repositories as well.
In this particular example, the medibuntu repos are set to have a lower priority, so that any package present in two repos from the /etc/apt/sources.list (here, medibuntu and skype) gets installed and upgraded preferably from the other repo (the skype one in the example):

Package: * 
Pin: release l=Medibuntu
Pin-Priority: 400

A package present only in the medibuntu repo will be installed/upgraded from medibuntu. As I said, very elegant!