Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

sometimes when installing a package, aptitude recommends several other packages.

Is there a way to show all previous recommended packages of all installed packages?

Thanks in advance.

Casper

Edit:

Thanks for the replys so far. I already tried:

aptitude show ~i | grep '^Recommends' | cut -d ' ' -f 2-

Thats mostly ok. But it gives also things back like:

 console-setup | console-data (>= 2002.12.04dbs-1)

I want an easy way, to install all missing recommended packages.

So

 aptitude install console-setup | console-data (>= 2002.12.04dbs-1)

won't work ;-)

Is there a way, without manual checking all entries, to do this?

share|improve this question
add comment

4 Answers 4

up vote 4 down vote accepted

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)

share|improve this answer
add comment

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}'
share|improve this answer
add comment

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
share|improve this answer
add comment

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 '^ '
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.