有没有办法显示所有以前推荐的所有已安装软件包?
提前致谢。
卡斯帕
编辑:
感谢迄今的答复。 我已经尝试过了:
aptitude show ~i | grep '^Recommends' | cut -d ' ' -f 2-
那大多是好的。 但它也给了回来的东西,如:
console-setup | console-data (>= 2002.12.04dbs-1)
我想要一个简单的方法,安装所有缺less的推荐软件包。
所以
aptitude install console-setup | console-data (>= 2002.12.04dbs-1)
将无法正常工作;-)
有没有办法,没有手动检查所有条目,这样做?
突触 – >自定义filter – >缺less推荐
要么
才能search'〜RBrecommends:〜我'
(感谢http://blog.isonoe.net/post/2011/07/18/Debian-Tips-1%3A-Find-missing-recommended-packages )
也许有一个更优雅的方式,但这对我来说,
for package in $(dpkg --get-selections | grep -v deinstall | awk '{print $1}') do echo $package dpkg-query -s $package | grep Recommends done
另一个build议:
awk '/(^Package|^Recomm)/' /var/lib/dpkg/status | grep -B1 ^Recommends
@EBitTony:awk也是很好的search,试试这个:
dpkg --get-selections | awk ' !/deinstall$/{print $1}'
在这里我的方式 – 报告失踪推荐:)
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 '^ '