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
smplayer:
 Installed: 14.9.0.6675-1~trusty1
 Candidate: 14.9.0.6675-1~trusty1
 Version table:
 *** 14.9.0.6675-1~trusty1 0
 500 http://ppa.launchpad.net/rvm/testing/ubuntu/ trusty/main amd64 Packages
 100 /var/lib/dpkg/status
 14.9.0.6672-1~trusty1 0
 500 http://ppa.launchpad.net/mc3man/trusty-media/ubuntu/ trusty/main amd64 Packages
 0.8.6-2 0
 500 http://archive.ubuntu.com/ubuntu/ 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 *