我的 /boot 空间不足。问题是,我一直在删除旧内核:
$ dpkg -l | grep linux-image
ii linux-image-4.15.0-36-generic 4.15.0-36.39 amd64 Signed kernel image generic
ii linux-image-generic 4.15.0.36.38 amd64 Generic Linux kernel image
看起来 4.15.0-34 和 4.13.0-19 没有被正确删除:
$ ls -al /boot
total 92545
drwxr-xr-x 5 root root 3072 Oct 6 10:04 .
drwxr-xr-x 26 root root 4096 Oct 3 14:54 ..
-rw-r--r-- 1 root root 1537610 Aug 27 10:45 abi-4.15.0-34-generic
-rw-r--r-- 1 root root 1537821 Sep 24 10:08 abi-4.15.0-36-generic
-rw-r--r-- 1 root root 216905 Aug 27 10:45 config-4.15.0-34-generic
-rw-r--r-- 1 root root 216954 Sep 24 10:08 config-4.15.0-36-generic
drwx------ 3 root root 4096 Dec 31 1969 efi
drwxr-xr-x 5 root root 1024 Oct 12 08:36 grub
-rw-r--r-- 1 root root 15422137 Sep 2 14:30 initrd.img-4.13.0-19-generic
-rw-r--r-- 1 root root 58504792 Oct 6 10:04 initrd.img-4.15.0-36-generic
drwx------ 2 root root 12288 Jul 29 2015 lost+found
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 0 Aug 27 10:45 retpoline-4.15.0-34-generic
-rw-r--r-- 1 root root 0 Sep 24 10:08 retpoline-4.15.0-36-generic
-rw------- 1 root root 4044038 Aug 27 10:45 System.map-4.15.0-34-generic
-rw------- 1 root root 4046393 Sep 24 10:08 System.map-4.15.0-36-generic
-rw------- 1 root root 8277752 Sep 24 11:54 vmlinuz-4.15.0-36-generic
apt-get autoremove
没有帮助:
$ sudo apt-get autoremove linux-image-4.15.0-34-generic
[sudo] password for matt:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'linux-image-4.15.0-34-generic' is not installed, so not removed
...
grub 也没用:
$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-36-generic
Found initrd image: /boot/initrd.img-4.15.0-36-generic
Adding boot menu entry for EFI firmware configuration
done
我如何才能安全地(重新)删除这些文件?还是只删除rm -f
它们?
答案1
已关注本指南来自@Vijay 的评论。