FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-29-2010, 04:21 PM
Sthu Deus
 
Default To find out the installed packages repo section.

Good day.

Is there an easy way how I can found out from which repo and which
section (or whatever it is called, I mean here: main, contrib,
non-free) one or more packages come from?

For example, I want to know if I have the packages installed from, say
Testing / contrib - how I can do this?

Thank You for Your time.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4c036573.1067f10a.6691.ffffc8a4@mx.google.com">htt p://lists.debian.org/4c036573.1067f10a.6691.ffffc8a4@mx.google.com
 
Old 05-31-2010, 08:25 AM
Brian Marshall
 
Default To find out the installed packages repo section.

On Sat, May 29, 2010 at 11:21:57PM +0700, Sthu Deus wrote:
> Is there an easy way how I can found out from which repo and which
> section (or whatever it is called, I mean here: main, contrib,
> non-free) one or more packages come from?
>
> For example, I want to know if I have the packages installed from, say
> Testing / contrib - how I can do this?

apt-cache policy packagename

Brian
 
Old 05-31-2010, 08:35 AM
Wolodja Wentland
 
Default To find out the installed packages repo section.

On Sat, May 29, 2010 at 23:21 +0700, Sthu Deus wrote:
> Is there an easy way how I can found out from which repo and which
> section (or whatever it is called, I mean here: main, contrib,
> non-free) one or more packages come from?

Certainly - Brought to me by #d's dpkg I now have the following among my
bash functions:

---- snip ---
function apt-listrepo () {
dpkg -l | awk '/^.i/ {print $2}'
| xargs apt-cache policy | awk '/^[a-z0-9.-]+:/ {pkg=$1}; /***/ {OFS=" "; ver=$2; getline; print pkg,ver,$2,$3}'
}
--- snip ---

It produces output like:

[...]
xmonad: 0.9.1-2+b1 http://ftp.de.debian.org squeeze/main
xorg: 1:7.5+6 http://ftp.de.debian.org squeeze/main
xorg-dev: 1:7.5+6 http://ftp.de.debian.org squeeze/main
xorg-docs-core: 1:1.5-1 http://ftp.de.debian.org squeeze/main
[...]

Have fun
--
.'`. Wolodja Wentland <wentland@cl.uni-heidelberg.de>
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
 
Old 05-31-2010, 08:58 AM
Andrei Popescu
 
Default To find out the installed packages repo section.

On Sb, 29 mai 10, 23:21:57, Sthu Deus wrote:
> Good day.
>
> Is there an easy way how I can found out from which repo and which
> section (or whatever it is called, I mean here: main, contrib,
> non-free) one or more packages come from?
>
> For example, I want to know if I have the packages installed from, say
> Testing / contrib - how I can do this?

Per package you can use 'apt-cache policy <package>'. If you want to
find all installed packages from contrib or non-free look at aptitude's
patterns in /usr/share/doc/aptitude/README

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 

Thread Tools




All times are GMT. The time now is 04:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org