aptitude: list all previous recommended packages

Solution 1:

Synaptic -> Custom Filters -> Missing Recommends

or

aptitude search '~RBrecommends:~i'

(thanks to http://blog.isonoe.net/post/2011/07/18/Debian-Tips-1%3A-Find-missing-recommended-packages)

Solution 2:

Maybe there's a more elegant way, but this works for me,

for package in $(dpkg --get-selections | grep -v deinstall | awk '{print $1}')
  do
    echo $package
    dpkg-query -s $package | grep Recommends
  done

Solution 3:

another suggestion:

awk '/(^Package|^Recomm)/' /var/lib/dpkg/status | grep -B1 ^Recommends

@EightBitTony: awk is also very good in searching, try this:

dpkg --get-selections | awk ' !/deinstall$/{print $1}'

Solution 4:

Here my way - report for missing recommends :)

apt-cache --no-pre-depends --no-depends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances depends `dpkg --get-selections | grep '\sinstall$' | cut -f1` | grep -vf <(dpkg --get-selections | grep '\sinstall$' | cut -f1 | sed -e 's/^/ /' -e 's/\(:.*\|\)$/$/') | grep -B1 '^ '