How To Find Out To Which PPA Repository A Package Belongs To
There are various reasons why you may need to find out to which PPA a package belongs to, for instance, in case a package in a PPA breaks something on your system, if you want to install a package which is already installed on your computer on some other machine but you don’t know the PPA you’ve used to install it and so on.
So here’s a quick tip on how to find out to which PPA a package belongs to.
To find out the PPA to which a package belongs to, simply run the following command in a terminal (this only works for packages which are already installed and doesn’t work for packages available in the PPA repository but which are not installed on your system) :
apt-cache policy <b>PACKAGE_NAME</b>
replacing "PACKAGE_NAME" with the package you want to find out the PPA for.
Example :
apt-cache policy oracle-java7-installer
Here’s how the command output looks like :
As you can see, the command output displays the PPA url, which, right after "ppa.launchpad.net" contains the PPA you’ve used to install the package ("webupd8team/java" in my example above).
This, of course, also works with packages from the official Ubuntu repositories as well as packages from non-Launchpad repositories. For instance, here’s how the output of "apt-cache policy opera" looks like (Opera is installed through its own repository) :
If the repository url is missing, it means you’ve installed the deb manually, not through a repository (and the package is not available in any repository on your system) or that the repository has been disabled or removed after the package installation.
Originally published at WebUpd8 : Daily Ubuntu / Linux news and application reviews.
Cet article est repris du site http://feedproxy.google.com/~r/webu...