APT : Prioritize certain repositories

by
This article explains how to prioritize certain package repository ( or source) over the other.

This can be accomplished using the apt-pinning feature. A typical use case is prioritizing local packages over remote ones or installing older package rather than the new ( unstable ) one in other repository.

Just create a file ‘preferences’ in the ‘/etc/apt/’ directory.

$gksudo gedit /etc/apt/preferences

Then add the packages required ::

Package: *
Pin: origin *
Pin-Priority: 600

The default priority is 500, anything greater will be prioritized.

For eg, if you want to install package ‘skype’ from the ‘medibuntu’ repository add the following ::

Package: skype
Pin: origin packages.medibuntu.com
Pin-Priority: 600

More info can be found here.

Advertisements

Tags:

One Response to “APT : Prioritize certain repositories”

  1. stargazr Says:

    handy feature..especially for preferring local packages..good one..:)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: