Is there a method or command which can tell from which repository a package is coming from?
Ubuntu – How to find out which repository a package comes from
aptpackage-managementrepository
aptpackage-managementrepository
Is there a method or command which can tell from which repository a package is coming from?
Best Answer
Edit:
Check out SuB's answer. Looks a bit simpler!
Original:
Commands Needed:
dpkg -s <package>
- allows you to find the version of that you have installed. (source)apt-cache showpkg <package>
- will show a list of Versions of the package available. For each version, the source of the package, in the form of an index file name, will be given.If you want to find the source of the package that's currently installed, you'll need the output of
dpkg -s <package>
. Otherwise, you can simply look at the newest version output byapt-cache showpkg <package>
.Example:
From the first command, I can see that Liferea version 1.6.2-1ubuntu6 is installed. From the second command, I can see that that version is listed in
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages
.Without too much effort, I can deduce that the source line contains
archive.ubuntu.com
,ubuntu
,lucid
, andmain
.And, sure enough, my
/etc/apt/sources.list
contains the following line.