删除 linux-image-5.10.0-21-amd64、linux-image-5.10.0-23-amd64 软件包是否安全?删除一些不必要的带有依赖项的 Firefox 语言包后,系统提示我自动删除一些不再需要的包:hunspell-gl-es, hunspell-sv-se, linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64
。
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
hunspell-gl-es hunspell-sv-se linux-image-5.10.0-21-amd64 linux-image-5.10.0-23-amd64
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 636 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 253674 files and directories currently installed.)
Removing hunspell-gl-es (1:7.1.0~rc3-3) ...
Removing hunspell-sv-se (1:7.1.0~rc3-3) ...
Removing linux-image-5.10.0-21-amd64 (5.10.162-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-21-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-25-amd64
Found initrd image: /boot/initrd.img-5.10.0-25-amd64
Found linux image: /boot/vmlinuz-5.10.0-24-amd64
Found initrd image: /boot/initrd.img-5.10.0-24-amd64
Found linux image: /boot/vmlinuz-5.10.0-23-amd64
Found initrd image: /boot/initrd.img-5.10.0-23-amd64
Found linux image: /boot/vmlinuz-5.10.0-9-amd64
Found initrd image: /boot/initrd.img-5.10.0-9-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
done
Removing linux-image-5.10.0-23-amd64 (5.10.179-3) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-23-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-25-amd64
Found initrd image: /boot/initrd.img-5.10.0-25-amd64
Found linux image: /boot/vmlinuz-5.10.0-24-amd64
Found initrd image: /boot/initrd.img-5.10.0-24-amd64
Found linux image: /boot/vmlinuz-5.10.0-9-amd64
Found initrd image: /boot/initrd.img-5.10.0-9-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
done
编辑:
当前包:
$ apt list -i 'linux-image*'
Listing... Done
linux-image-5.10.0-24-amd64/now 5.10.179-5 amd64 [installed,local]
linux-image-5.10.0-25-amd64/oldstable-security,now 5.10.191-1 amd64 [installed,automatic]
linux-image-5.10.0-26-amd64/oldstable,now 5.10.197-1 amd64 [installed,automatic]
linux-image-5.10.0-9-amd64/now 5.10.70-1 amd64 [installed,local]
linux-image-amd64/oldstable,now 5.10.197-1 amd64 [installed]
答案1
那应该安全起见,apt 非常擅长跟踪所需的内核;除非你有一个非常无聊的 apt 数据库。
检查当前活动的内核可能会有所帮助(确保它具有更高的版本号)。 Apt 通常保留 2 到 3 代内核并集成到 grub 中。
如果您已aptitude
安装,快速检查将是:
aptitude search ~ilinux-image
没有aptitude
:
dpkg --get-selections | awk '/linux-image/ && $2=="install"'
或者安装 aptitude ;D