On 09/17/12 13:05, Dmitriy Matrosov wrote:
Just want to add: if you need to exclude these packages (like ones with status 'deinstall ok config-files') you may do this by filtering dpkg-query output, like so[1]: Though, note, that (/var/lib/dpkg/status) file will be listed in`apt-cache showpkg` output even for uninstalled packages, which config filesstill present. E.g. for status, like: Status: deinstall ok config-files
$ dpkg-query -Wf '${Package}\t${Status}\n' | sed -ne '/install ok installed/s/\t.*//p'