Sometimes 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: 22.214.171.12475-1~trusty1 Candidate: 126.96.36.19975-1~trusty1 Version table: *** 188.8.131.5275-1~trusty1 0 500 http://ppa.launchpad.net/rvm/testing/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status 184.108.40.20672-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.