On a Debian-based system, including Ubuntu, how can one tell which repository a package will be downloaded from, without actually beginning the download? aptitude show
and apt-cache info
will show the section (e.g., metapackage, base, graphics), but not the repository to which a package belongs (e.g., http://ppa.launchpad.net/mactel-support/ppa/ubuntu or http://us.archive.ubuntu.com/ubuntu/).
When installing the package, the actual repository appears during the download (it is printed out in the "downloading from ..." output from apt and similar programs), but how can one obtain information on the repository containing the package (or a specific version of a package) without downloading and installing it first?
Additionally, how can one determine the source repository for a package that is already installed?
Answer
I run apt-cache policy
:
$ apt-cache policy wajig
wajig:
Installed: 2.1
Candidate: 2.1
Version table:
*** 2.1 0
100 /var/lib/dpkg/status
2.0.47 0
500 file:/home/wena/.repo_bin/ squeeze/main i386 Packages
500 ftp://ftp.is.co.za/debian/ squeeze/main i386 Packages
That means that there are three wajig
packages:
One that is installed (
/var/lib/dpkg/status
)One that is available from a local repository (
file:/home/wena/.repo_bin/
)One that is available from a remote repository (
ftp://ftp.is.co.za/debian
), which also happens to have the same version (2.0.47) as the one in a local repository
Additionally, apt-cache madison
will display similar information in a tabular format.
wajig | 2.2 | mirror://mirrors.ubuntu.com/mirrors.txt/ precise/universe amd64 Packages
wajig | 2.2 | mirror://mirrors.ubuntu.com/mirrors.txt/ precise/universe Sources
No comments:
Post a Comment