我正在使用 Ubuntu,其功能如下:
linux-image-5.8.0-28-generic
linux-modules-5.8.0-28-generic
linux-modules-nvidia-455-5.8.0-28-generic
更新后linux-modules-nvidia-455-generic-hwe-20.04-edge
,我卡在制造商的徽标屏幕上,无法从当前内核启动计算机。
我可以通过从 GRUB 屏幕选择以前的内核(5.8.0.26)来继续使用计算机。
您能告诉我如何在新的更新中卸载并重新安装该软件包以及我该怎么做吗?
我是一个新的 Ubuntu 用户。
答案1
继续使用即可。使用以下命令5.8.0.26
定期检查是否有比损坏的内核版本更新的内核版本:5.8.0-28-generic
$ ls /boot/vm*
/boot/vmlinuz-3.16.60-031660-generic /boot/vmlinuz-4.14.188-0414188-generic
/boot/vmlinuz-4.14.110-0414110-generic /boot/vmlinuz-4.14.70-041470-generic
/boot/vmlinuz-4.14.114-0414114-generic /boot/vmlinuz-4.14.78-041478-generic
/boot/vmlinuz-4.14.120-0414120-generic /boot/vmlinuz-4.14.89-041489-generic
/boot/vmlinuz-4.14.134-0414134-generic /boot/vmlinuz-4.14.98-041498-generic
/boot/vmlinuz-4.14.140-0414140-generic /boot/vmlinuz-4.15.0-126-generic
/boot/vmlinuz-4.14.153-0414153-generic /boot/vmlinuz-4.15.0-128-generic
/boot/vmlinuz-4.14.165-0414165-generic /boot/vmlinuz-4.4.0-197-generic
/boot/vmlinuz-4.14.170-0414170-generic /boot/vmlinuz-5.0.1-050001-generic
/boot/vmlinuz-4.14.177-0414177-generic
请记住我的清单很不寻常。
当您在屏幕上看到比损坏版本更新的内容时,请重新启动并选择普通旧菜单选项“Ubuntu”的最新选项,看看它是否正常运行。
您无需执行任何特殊操作即可获得通过定期更新安装的较新版本。您无需执行任何特殊操作即可删除旧版本,只需执行以下操作即可sudo apt autoremove
后您确认当前最新版本运行正常。
总结
忽略建议仅清除单个软件包的答案。特定内核版本可能有许多软件包:
$ apt list | grep 4.15.0-126
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
linux-headers-4.15.0-126/now 4.15.0-126.129~16.04.1 all [installed,local]
linux-headers-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-hwe-tools-4.15.0-126/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-image-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-extra-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-tools-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
显然不仅仅如此:
linux-image-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
按照另一个答案所建议的方式安装。
假设您尝试删除一个:
$ sudo apt purge linux-image-4.15.0-126-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-hwe-tools-4.15.0-117 linux-hwe-tools-4.15.0-118 linux-hwe-tools-4.15.0-120
linux-hwe-tools-4.15.0-122 linux-hwe-tools-4.15.0-123
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-126-generic* linux-modules-extra-4.15.0-126-generic*
0 upgraded, 0 newly installed, 2 to remove and 59 not upgraded.
After this operation, 179 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 823126 files and directories currently installed.)
Removing linux-modules-extra-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...
Purging configuration files for linux-modules-extra-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...
Removing linux-image-4.15.0-126-generic (4.15.0-126.129~16.04.1) ...
之后你仍然有:
$ apt list | grep 4.15.0-126
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
linux-headers-4.15.0-126/now 4.15.0-126.129~16.04.1 all [installed,local]
linux-headers-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-hwe-tools-4.15.0-126/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-modules-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
linux-tools-4.15.0-126-generic/now 4.15.0-126.129~16.04.1 amd64 [installed,local]
答案2
查看已安装的内核映像:
dpkg -l | grep linux-image
然后用以下命令删除它们:
sudo apt purge linux-image-x.x.x-x-generic