apt-show-versions 拉伸

apt-show-versions 拉伸

2天前我从jessie升级到stretch。升级后我总是使用

dpkg -l | egrep '^ii' | awk '{print $2}' | xargs apt-show-versions | egrep -v new release-name` to identfy and purge packages from old release. But now something went wrong with apt-show-version. `head -n20 /root/apt-show-versions 
accountsservice:i386 not installed
acl:i386 not installed
acpi:i386 not installed
acpi-fakekey:i386 not installed
acpid:i386 not installed
alsa-base:all 1.0.27+1 installed: No available version in archive
alsa-utils:i386 not installed
alsaplayer-gtk:i386 not installed
amd64-microcode:i386 not installed
anacron:i386 not installed
apache2-bin:i386 not installed
apmd:i386 not installed
apt:i386 not installed
apt-transport-https:i386 not installed
apt-utils:i386 not installed
aptdaemon:all 1.1.1-4+deb8u1 installed: No available version in archive
aptdaemon-data:all 1.1.1-4+deb8u1 installed: No available version in archive
aptitude:i386 not installed
aptoncd:all 0.1.98+bzr117-1.4 installed: No available version in archive
arp-scan:i386 not installed

我对未安装的内容不感兴趣。

申请 1 包:

dpkg -l | grep xwayland | xargs apt-show-versions 
2 not available for architecture 1.19.2-1+deb9u1
Use of uninitialized value $arch in concatenation (.) or string at /usr/bin/apt-show-versions line 370.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 373.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 385.
X: not installed
Use of uninitialized value $arch in concatenation (.) or string at /usr/bin/apt-show-versions line 370.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 373.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 385.
Xwayland: not installed
Use of uninitialized value $arch in concatenation (.) or string at /usr/bin/apt-show-versions line 370.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 373.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 385.
amd64: not installed
Use of uninitialized value $arch in concatenation (.) or string at /usr/bin/apt-show-versions line 370.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 373.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 385.
ii: not installed
Use of uninitialized value $arch in concatenation (.) or string at /usr/bin/apt-show-versions line 370.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 373.
Use of uninitialized value $arch in hash element at /usr/bin/apt-show-versions line 385.
server: not installed
xwayland:amd64/stretch 2:1.19.2-1+deb9u1 uptodate
xwayland:i386 not installed

我怎样才能避免呢。apt-show-versions -V Apt-Show-Versions v.0.22.6 (c) Christoph Marti

答案1

您应该使用以下命令:

dpkg -l | grep -o package-name | xargs apt-show-versions

代替

dpkg -l | grep package-name | xargs apt-show-versions

要仅查看要升级的包,您可以使用:

apt-show-versions | grep upgradeable

可以通过以下方式列出过时的软件包:

apt-show-versions | grep 'No available version'

相关内容