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

If a PPA in your sources list has a package of the same name in the Ubuntu Software Center, which one shows up in the software center. Likewise, which package is downloaded via apt-get install ?

share|improve this question
up vote 2 down vote accepted

Whichever repo has the latest version of the package is the one shown in the Ubuntu Software center and downloaded with apt-get install. It is like this by default, but can be changed in the Software Repositories window.

share|improve this answer
Can you elaborate how to change the default behavior and into what it can be changed? Thanks! – neckTwi Sep 15 '14 at 13:15

Package priority

The priorities of package sources is defined in the local package configuration.
This configuration can be inspected with apt-cache policy.

Here is an example of what apt-cache policy shows for the package git that is available in the Ubuntu main package repository, and in a PPA, and the PPA version is currently installed:

$ apt-cache policy git
  Installed: 1:2.1.0-1~ppa0~ubuntu14.04.1
  Candidate: 1:2.1.0-1~ppa0~ubuntu14.04.1
  Version table:
 *** 1:2.1.0-1~ppa0~ubuntu14.04.1 0
        500 trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.9.1-1 0
        500 trusty/main amd64 Packages

The numbers in front of the URLs specify the priority. The package from a source with the highest priority is preferred, if there is only one source with this priority.

Newer package of equal priority

If there are multiple entries of the highest priority, as it is the case here, the newer version is preferred.

Change priorities

To change the priorities to prefer a specific version, exceptions rules can be defined in /etc/apt/preferences. Locking a package to a fixed version is called "pinning".
See PinningHowto.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.