As the tittle suggests: I'm looking for a way to list every package that is recommended by one of the packages that are already installed on my system. Kinda similarly to how apt
displays recommended packages when installing something.
I'd prefer to have the list as X package recommends: W,Y,Z packages
.
2 Answers
This works:
dpkg-query -W -f \
'${db:Status-Abbrev} ${Package} package recommends ${Recommends} packages\n' |
sed -nr '/( [^ ]+){5,}/ s/^.i. //p'
However the following code generate duplicate data, but for start point is good point:
dpkg -l "*" |egrep ^ii |awk {'print $2'} | xargs apt-cache show |egrep ^Recomm
You should same thing in a loop:
pack=`dpkg -l "*" |egrep ^ii |awk {'print $2'}`
echo ${pack}:`apt-cache show $pack|egrep ^Recomm`