Re: How to list all the non-free packages installed
Stefan Monnier wrote:
> Every once in a while I need to install a non-free package, so my system
> does have some non-free packages installed. What command can I use to find
> out what packages are those (so I can remove them or replace them with free
> alternatives)?
grep-status and grep-available are very powerful tools for answering
this sort of question.
To print out installed non-free packages:
grep-status -FSection -r 'non-free/.*' -a \
-FStatus 'install ok installed' -sPackage
-FSection tells it to search the "Section" field for the regexp (-r)
"non-free/.*"; -a gives a logical and; the string after -FStatus tells
it to look only for currently installed packages; and -sPackage tells it
to output only the Package field of matching packages.
As others have already said, vrms provides a shortcut for this
particular query.
> Similarly for packages from `unstable, or `experimental'?
This one can't be done by grep-status et al because information about
the distribution from which the package came isn't provided in dpkg's
status file. But apt-show-versions can help.
regards,
--
Kevin B. McCarty <kmccarty@princeton.edu> Physics Department
WWW: http://www.princeton.edu/~kmccarty/ Princeton University
GPG: public key ID 4F83C751 Princeton, NJ 08544
Reply to: