vrms
[1] 返回“主机名上没有安装非免费或贡献包!rms 会感到自豪。” [ dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-free
2] 在终端上不返回任何内容。
然而,运行后
packages=`dpkg --get-selections | awk '{ print $1 }' | sed 's/:amd64//'`
for package in $packages; do echo "<<< $package >>> "; cat /usr/share/doc/$package/copyright; done > ./licenses
我看到如下输出,其中表示某些软件包没有许可证:
cat: /usr/share/doc/libddccontrol0/copyright: No such file or directory
cat: /usr/share/doc/linux-image-4.19.0-12-amd64/copyright: No such file or directory
cat: /usr/share/doc/live-tools/copyright: No such file or directory
cat: /usr/share/doc/rsync/copyright: No such file or directory
cat: /usr/share/doc/user-setup/copyright: No such file or directory
在这种情况下,[1] 和 [2] 命令如何决定它们也是免费的?
答案1
答案2
执行dpkg --get-selections | grep deinstall
如果返回输出中的相同包,请使用以下命令清除它们apt-get purge PACKAGENAME
并再次重复您的步骤