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.

Comment

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