![如何清理 GRUB 中的重复条目?](https://linux22.com/image/1194380/%E5%A6%82%E4%BD%95%E6%B8%85%E7%90%86%20GRUB%20%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E6%9D%A1%E7%9B%AE%EF%BC%9F.png)
我想清理 Ubuntu 22.04 上的 GRUB 中的条目,因为有很多重复项:
以下是 GRUB 菜单的屏幕截图:
所有事情好像都列出了两次。
我已经运行了apt-get autoremove --purge
,但没有任何内容需要删除。以下是 的输出update-grub2
:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-147-generic
Found initrd image: /boot/initrd.img-5.4.0-147-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-147-generic
Found initrd image: /boot/initrd.img-5.4.0-147-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
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.
Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-147-generic
Found initrd image: /boot/initrd.img-5.4.0-147-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-147-generic
Found initrd image: /boot/initrd.img-5.4.0-147-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.4.0-147-generic
Found initrd image: /boot/initrd.img-5.4.0-147-generic
Found linux image: /boot/vmlinuz-3.5.0-54-generic
Found initrd image: /boot/initrd.img-3.5.0-54-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
done
以下是 的列表/etc/grub.d/
:
-rwxr-xr-x 1 root root 10627 Dez 2 16:20 00_header
-rwxr-xr-x 1 root root 6260 Dez 2 16:18 05_debian_theme
-rwxr-xr-x 1 root root 1408 Mär 7 2020 06_linux_proxy
-rwxr-xr-x 1 root root 18683 Dez 2 16:18 10_linux
-rwxr-xr-x 1 root root 43031 Dez 2 16:18 10_linux_zfs
-rwxr-xr-x 1 root root 14180 Dez 2 16:18 20_linux_xen
-rwxr-xr-x 1 root root 2924 Feb 6 2022 20_memtest86+
-rwxr-xr-x 1 root root 13369 Dez 2 16:18 30_os-prober
-rwxr-xr-x 1 root root 188 Mär 7 2020 30_os-prober_proxy
-rwxr-xr-x 1 root root 1372 Dez 2 16:18 30_uefi-firmware
-rwxr-xr-x 1 root root 1448 Mär 7 2020 31_linux_proxy
-rwxr-xr-x 1 root root 188 Mär 7 2020 32_os-prober_proxy
-rwxr-xr-x 1 root root 1448 Mär 7 2020 33_linux_proxy
-rwxr-xr-x 1 root root 11298 Nov 11 2019 34_linux_xen
-rwxr-xr-x 1 root root 700 Jul 3 2022 35_fwupd
-rwxr-xr-x 1 root root 1992 Mär 12 2014 35_memtest86+
-rwxr-xr-x 1 root root 1418 Mär 22 2019 36_uefi-firmware
-rwxr-xr-x 1 root root 214 Jan 22 2013 40_custom
-rwxr-xr-x 1 root root 215 Dez 2 16:18 41_custom
-rwxr-xr-x 1 root root 1448 Mär 7 2020 42_linux_proxy
drwxr-xr-x 4 root root 4096 Okt 3 2014 backup
drwxr-xr-x 2 root root 4096 Okt 3 2014 bin
drwxr-xr-x 2 root root 4096 Mär 7 2020 proxifiedScripts
-rw-r--r-- 1 root root 483 Jan 22 2013 README
有人能告诉我这些重复项从何而来以及如何摆脱它们吗?