10

In Debian or one of its derivatives, how can I list all packages which I have installed from lenny-backports?

The closest I've come up with is:

aptitude search ~i~Alenny-backports

However, that lists all installed packages for which there exists a version in backports even if the currently installed version is not the one from backports. I'd like to list only the packages for which the currently installed version is from backports (or, not lenny, if that's easier).

Cheers

thomasrutter
  • 2,656

2 Answers2

16

Aptitude has a ?narrow search term for just this:

aptitude search '~S ~i ~Abackports'
aptitude search '?narrow(~i, ~Abackports)'
Tobu
  • 4,495
0

You can use the grep-status command (provided via the 'dctrl-tools' package):

grep-status -sPackage,Version -F Status 'installed' -a -F Version 'bp'

Example of output:

Package: libsvn-perl
Version: 1.6.4dfsg-1~bpo50+1

Package: subversion-tools
Version: 1.6.4dfsg-1~bpo50+1

Package: subversion
Version: 1.6.4dfsg-1~bpo50+1

Package: libapache2-svn
Version: 1.6.4dfsg-1~bpo50+1

Package: libsvn1
Version: 1.6.4dfsg-1~bpo50+1

Package: libdb4.7
Version: 4.7.25-7~bpo50+1

Package: trac
Version: 0.11.6-1~bpo50+1

Package: python-subversion
Version: 1.6.4dfsg-1~bpo50+1

If you need a more compact output (more suitable for further script-based processing), use simply

grep-status -nsPackage -F Status 'installed' -a -F Version 'bp'
Flo
  • 85