Find package repository on Ubuntu

ubuntu_logo_81x81Sometimes you may want to know which repository or PPA is the source of a package on Ubuntu. More so when you have multiple PPAs added and more than one of those provide the same package. You may also want to know which repository provides the latest version. Use the apt-cache command for all these information. Here’s an example for SMPlayer on my system:

$ apt-cache policy smplayer
 Version table:
 *** 0
 500 trusty/main amd64 Packages
 100 /var/lib/dpkg/status 0
 500 trusty/main amd64 Packages
 0.8.6-2 0
 500 trusty/universe amd64 Packages

As you can see from the above output, 3 repositories added in my system provide the package SMPlayer, with the latest version from rvm/testing ppa. The currently installed version is preceded by *** and the line below shows the repository which provides it.

Leave a Reply

Your email address will not be published. Required fields are marked *