我想看看是否有办法检查某个软件包是否在新的 Ubuntu 版本(例如 20.04 --> 20.10)上从软件包存储库中重命名/删除。这也适用于其他软件包存储库中的软件包(已添加到 apt 的缓存中)。
我曾想过使用
apt show $PACKAGE_NAME > /dev/null
并检查命令的退出状态以查看该特定包是否存在。
答案1
尝试软件包rmadison
中包含的命令devscripts
。这是一个简单的 python3 脚本(您可以编辑它),用于查询每个版本的 madison 数据库。
以下是实际操作的示例rmadison
。让我们看一下chromium-browser
几年前发生过变化的软件包。deb 软件包被仅安装 snap 软件包的占位符所取代。您可以轻松看到差异。
$ rmadison chromium-browser
chromium-browser | 18.0.1025.151~r130497-0ubuntu1 | precise/universe | source, amd64, armel, armhf, i386
chromium-browser | 32.0.1700.107-0ubuntu0.12.04.1~20140204.866.1 | precise-security/universe | armel
chromium-browser | 32.0.1700.107-0ubuntu0.12.04.1~20140204.866.1 | precise-updates/universe | armel
chromium-browser | 34.0.1847.116-0ubuntu2 | trusty/universe | source, amd64, armhf, i386
chromium-browser | 37.0.2062.120-0ubuntu0.12.04.4 | precise-security/universe | source, amd64, armhf, i386
chromium-browser | 37.0.2062.120-0ubuntu0.12.04.4 | precise-updates/universe | source, amd64, armhf, i386
chromium-browser | 49.0.2623.108-0ubuntu1.1233 | xenial/universe | source, amd64, armhf, i386
chromium-browser | 65.0.3325.181-0ubuntu0.14.04.1 | trusty-security/universe | source, amd64, armhf, i386
chromium-browser | 65.0.3325.181-0ubuntu0.14.04.1 | trusty-updates/universe | source, amd64, armhf, i386
chromium-browser | 65.0.3325.181-0ubuntu1 | bionic/universe | source, amd64, arm64, armhf, i386
chromium-browser | 80.0.3987.163-0ubuntu1 | focal/universe | source, amd64, arm64, armhf
chromium-browser | 89.0.4389.90-0ubuntu0.16.04.2 | xenial-security/universe | source, amd64, arm64, armhf, i386
chromium-browser | 89.0.4389.90-0ubuntu0.16.04.2 | xenial-updates/universe | source, amd64, arm64, armhf, i386
chromium-browser | 89.0.4389.90-0ubuntu0.18.04.2 | bionic-security/universe | source, amd64, arm64, armhf, i386
chromium-browser | 89.0.4389.90-0ubuntu0.18.04.2 | bionic-updates/universe | source, amd64, arm64, armhf, i386
chromium-browser | 1:85.0.4183.83-0ubuntu0.20.04.2 | focal-updates/universe | source, amd64, arm64, armhf
chromium-browser | 1:85.0.4183.83-0ubuntu2 | groovy/universe | source, amd64, arm64, armhf
chromium-browser | 1:85.0.4183.83-0ubuntu2 | hirsute/universe | source, amd64, arm64, armhf