Is there a way to list all non-free and contrib software installed in Debian via apt?/etc/apt/sources.list is as followsdeb http://ftp.us.debian.org/debian/ wheezy main non-free contribdeb-src http://ftp.us.debian.org/debian/ wheezy main non-free contribdeb http://security.debian.org/ wheezy/updates main non-free contribdeb-src http://security.debian.org/ wheezy/updates main non-free contrib# wheezy-updates, previously known as 'volatile'deb http://ftp.us.debian.org/debian/ wheezy-updates maindeb-src http://ftp.us.debian.org/debian/ wheezy-updates mainI added non-free and contrib years ago because I needed a non-free driver for my video-card, which has now been replaced with a new one that doesn't require a non-free driver. I'd like to get rid of the non-free stuff, but I'm afraid I might have installed other non-free software over the years which I cannot afford to uninstall.
List all software installed from particular component (non-free, contrib)
debian;apt;dpkg
dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-freeaptitude search '~i ?section(non-free)'Section will be non-free/... for everything from the non-free path.[Note] for gcc docs... This documentation is licensed under the terms of the GNU Free Documentation License, and contains invariant sections, so it can't be part of Debian main.(I wondered about that too, but didn't bother checking until it was mentioned.)