From: Sthu Deus on
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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4c036573.1067f10a.6691.ffffc8a4(a)mx.google.com
From: Brian Marshall on
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
From: Wolodja Wentland on
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="\t"; 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(a)cl.uni-heidelberg.de>
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
From: Andrei Popescu on
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