PDA

View Full Version : [ubuntu] Determine repo



alistairh77
June 19th, 2011, 01:50 PM
Hi,

How do you determine which repo a package will be downloaded from?

I'm using the Server edition and using apt rather than a GUI. Sorry - I know this is really easy but haven't been able to find the answer.

Thanks

dino99
June 19th, 2011, 02:58 PM
http://wiki.vpslink.com/Linux_Command_Reference:_aptitude_%28Debian,_Ubunt u%29

Cheesehead
June 19th, 2011, 03:27 PM
Try the 'apt-cache' command

apt-cache show packagename
Look in the 'Filename' field. For example, the 'hello' package is in Main

my-system:~$ apt-cache show hello | grep Filename
Filename: pool/main/h/hello/hello_2.5-1_i386.deb

my-system:~$ apt-cache show hello | grep Filename | cut -d'/' -f2
main

my-system:~$ apt-cache show skype | grep Filename | cut -d'/' -f2
partner



Tip: apt-cache also has a very handy search feature, if you don't know the package name.
apt-cache search skype

amauk
June 19th, 2011, 03:34 PM
apt-cache policy <package>

will show you the installed version, any updated versions available and which repositories each version is in