apt-show-versions 使用 -r 显示未安装的软件包?

apt-show-versions 使用 -r 显示未安装的软件包?

apt-show-versions正如我多年来一直使用的那样,它总是表现得如此,即在使用-r开关/选项时:

   -r, --regex
       interpret package from option -p as a regex.

...它没有显示未安装的软件包;而如果您想列出所有软件包(包括未安装的软件包),则必须使用-R

   -R, --regex-all
       like --regex, but also show matching packages which are not installed

但是,自从我切换到 Ubuntu 18.04 后,我发现它也-r开始列出未安装的软件包;例如,这是我linux在内核升级后查找时得到的结果:

$ apt-show-versions -r linux
binutils-i686-linux-gnu:amd64/bionic-updates 2.30-21ubuntu1~18.04 uptodate
binutils-i686-linux-gnu:i386 not installed
binutils-x86-64-linux-gnu:amd64/bionic-updates 2.30-21ubuntu1~18.04 uptodate
binutils-x86-64-linux-gnu:i386 not installed
console-setup-linux:all/bionic-updates 1.178ubuntu2.7 uptodate
libselinux1:amd64/bionic 2.7-2build2 uptodate
libselinux1:i386/bionic 2.7-2build2 uptodate
linux-base:all/bionic 4.5ubuntu1 uptodate
linux-firmware:all/bionic-security 1.173.2 uptodate
linux-generic:amd64/bionic-security 4.15.0.43.45 uptodate
linux-generic:i386 not installed
linux-headers-4.15.0-43:all/bionic-security 4.15.0-43.46 uptodate
linux-headers-4.15.0-43-generic:amd64/bionic-security 4.15.0-43.46 uptodate
linux-headers-4.15.0-43-generic:i386 not installed
linux-headers-generic:amd64/bionic-security 4.15.0.43.45 uptodate
linux-headers-generic:i386 not installed
linux-image-4.15.0-43-generic:amd64/bionic-security 4.15.0-43.46 uptodate
linux-image-4.15.0-43-generic:i386 not installed
linux-image-generic:amd64/bionic-security 4.15.0.43.45 uptodate
linux-image-generic:i386 not installed
linux-libc-dev:amd64/bionic-security 4.15.0-43.46 uptodate
linux-libc-dev:i386/bionic-security 4.15.0-43.46 uptodate
linux-modules-4.15.0-43-generic:amd64/bionic-security 4.15.0-43.46 uptodate
linux-modules-4.15.0-43-generic:i386 not installed
linux-modules-extra-4.15.0-43-generic:amd64/bionic-security 4.15.0-43.46 uptodate
linux-modules-extra-4.15.0-43-generic:i386 not installed
linux-sound-base:all/bionic 1.0.25+dfsg-0ubuntu5 uptodate
playonlinux:all/bionic 4.3.4 uptodate
pptp-linux:amd64/bionic 1.9.0+ds-2 uptodate
pptp-linux:i386 not installed
syslinux:amd64/bionic 3:6.03+dfsg1-2 uptodate
syslinux:i386 not installed
syslinux-common:all/bionic 3:6.03+dfsg1-2 uptodate
syslinux-legacy:amd64/bionic 2:3.63+dfsg-2ubuntu9 uptodate
syslinux-legacy:i386 not installed
util-linux:amd64/bionic-updates 2.31.1-0.4ubuntu3.2 uptodate
util-linux:i386 not installed

事情是这样的,我一直使用apt-show-versions,主要是为了识别已安装内核升级后,Linux 内核,所以我知道要删除什么。

也许问题在于我还启用了 i386 架构(自 Ubuntu 18.04 以来,不再有 32 位 Ubuntu 版本)——再说一次,我之前曾同时启用过 i386 和 amd64,并且apt-show-versions据我所知,并没有出现这种情况。

那么,有人知道如何才能让它apt-show-versions -r恢复到以前的状态吗——表现出仅有的安装了软件包吗?我真的不想通过管道grep或其他方式来获得以前可以轻松获得的结果……

相关内容