升级到 20.4 后无法删除旧内核

升级到 20.4 后无法删除旧内核

将我的 Ubuntu 发行版从 18.04 更新到 20.04 后,我无法清理旧内核。因此,我无法运行任何更新或清理。目前,我的系统运行在最新的稳定版 5.4 内核上。在尝试清理旧内核时,我收到以下消息:

foo@foo:~$  sudo apt-get --purge autoremove
[sudo] password for foo:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED
  linux-image-extra-4.4.0-105-generic linux-image-extra-4.4.0-86-generic
0 to upgrade, 0 to newly install, 2 to remove and 1536 not to upgrade.
3 not fully installed or removed.
After this operation, 305 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 230131 files and directories currently installed.)
Removing linux-image-extra-4.4.0-105-generic (4.4.0-105.128) ...
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-105-generic /boot/vmlinuz-4.4.0-105-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-105-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-105-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-105-generic (--remove):
 installed linux-image-extra-4.4.0-105-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-extra-4.4.0-86-generic (4.4.0-86.109) ...
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-86-generic /boot/vmlinuz-4.4.0-86-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-86-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-86-generic (--remove):
 installed linux-image-extra-4.4.0-86-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-extra-4.4.0-105-generic
 linux-image-extra-4.4.0-86-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也尝试过重新安装/更新initramfs-tools,但也失败了。

sudo dpkg -P以同样的方式失败

相关内容