尝试升级时,我在终端中收到此消息:
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
apt-cache policy linux-generic linux-headers-generic linux-image-generic
linux-generic:
Installed: 5.4.0.67.70
Candidate: 5.4.0.70.73
Version table:
5.4.0.70.73 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
*** 5.4.0.67.70 100
100 /var/lib/dpkg/status
5.4.0.26.32 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
linux-headers-generic:
Installed: 5.4.0.67.70
Candidate: 5.4.0.70.73
Version table:
5.4.0.70.73 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
*** 5.4.0.67.70 100
100 /var/lib/dpkg/status
5.4.0.26.32 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
linux-image-generic:
Installed: 5.4.0.67.70
Candidate: 5.4.0.70.73
Version table:
5.4.0.70.73 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
*** 5.4.0.67.70 100
100 /var/lib/dpkg/status
5.4.0.26.32 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
grep -r "^deb\ " /etc/apt/ --include=*.list
/etc/apt/sources.list.d/linuxlite.list:deb http://repo.linuxliteos.com/linuxlite/ emerald main
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
有没有命令可以忽略或删除这 3 个?我不想一直看到他们被阻止的消息。谢谢。
答案1
尝试sudo apt full-upgrade
。
在大多数系统正常运行的情况下,这将安装“保留”的软件包。
这些包通常涉及包的更改姓名(正常情况下upgrade
无法处理)。
例如,从包迁移linux-image-extra-4.8.0-34-generic
到linux-image-extra-4.8.0-37-generic
涉及包名称的更改。