On Sun, Mar 14, 2010 at 17:23 -0400, Yavuz Yetim wrote: > I would like to list all packages installed from testing. How can I do > that?
The following works pretty well: 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}' That is all in one line and produces the following output: acl: 2.2.49-2 http://ftp.de.debian.org squeeze/main acpi: 1.4-2 http://ftp.de.debian.org squeeze/main acpi-support: 0.132-2 http://ftp.de.debian.org squeeze/main acpi-support-base: 0.132-2 http://ftp.de.debian.org squeeze/main acpid: 1:2.0.2-1 http://ftp.de.debian.org squeeze/main adduser: 3.112 http://ftp.de.debian.org squeeze/main alacarte: 0.12.4-2 http://ftp.de.debian.org squeeze/main alsa-base: 1.0.21+dfsg-2 http://ftp.de.debian.org squeeze/main alsa-utils: 1.0.22-1 http://ftp.de.debian.org squeeze/main anacron: 2.3-14 http://ftp.de.debian.org squeeze/main You can then use grep to search for whatever you want to search for. Alternatively you can take a look at apt-listrepository [1], but I haven't used that and can't comment on its capabilities. [1] http://svn.noreply.org/svn/weaselutils/trunk/apt-listrepository -- .''`. Wolodja Wentland <wentl...@cl.uni-heidelberg.de> : :' : `. `'` 4096R/CAF14EFC `- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature