0

During the update I got a message:

The upgrade has aborted. The upgrade needs a total of 239 M free space on disk '/boot'. Please free at least an additional 39.1 M of disk space on '/boot'. You can remove old kernels using 'sudo apt autoremove' and you could also set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce the size of your initramfs.

 root@localhost # df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       468M  242M  191M  56% /boot

root@localhost # ls -lah /boot total 235M drwxr-xr-x 4 root root 4.0K Oct 29 10:41 . drwxr-xr-x 20 root root 4.0K Dec 1 2022 .. -rw-r--r-- 1 root root 256K Jul 5 09:53 config-5.15.0-118-generic -rw-r--r-- 1 root root 256K Sep 27 18:21 config-5.15.0-124-generic drwxr-xr-x 4 root root 4.0K Oct 18 06:08 grub lrwxrwxrwx 1 root root 29 Oct 18 06:07 initrd.img -> initrd.img-5.15.0-124-generic -rw-r--r-- 1 root root 100M Oct 29 10:41 initrd.img-5.15.0-118-generic -rw-r--r-- 1 root root 100M Oct 29 10:40 initrd.img-5.15.0-124-generic lrwxrwxrwx 1 root root 29 Oct 18 06:08 initrd.img.old -> initrd.img-5.15.0-118-generic drwx------ 2 root root 16K May 19 2020 lost+found -rw------- 1 root root 6.0M Jul 5 09:53 System.map-5.15.0-118-generic -rw------- 1 root root 6.0M Sep 27 18:21 System.map-5.15.0-124-generic lrwxrwxrwx 1 root root 26 Oct 18 06:07 vmlinuz -> vmlinuz-5.15.0-124-generic -rw------- 1 root root 12M Jul 5 10:17 vmlinuz-5.15.0-118-generic -rw------- 1 root root 12M Sep 27 19:47 vmlinuz-5.15.0-124-generic lrwxrwxrwx 1 root root 26 Oct 18 06:08 vmlinuz.old -> vmlinuz-5.15.0-118-generic

root@localhost # uname -r 5.15.0-124-generic

The question is: will system boot after I delete /boot/initrd.img-5.15.0-118-generic, /boot/System.map-5.15.0-118-generic, /boot/vmlinuz-5.15.0-118-generic? After deleting, shall I point initrd.img.old and vmlinuz.old to the same current 124 version?

Mateusz
  • 111

2 Answers2

1

sudo apt-get purge 5.15.0-118-generic and sudo apt autoremove removed unused kernel and has freed up space on /boot!

Mateusz
  • 111
0

In the future I recommend using Bleachbit to clean old kernels etc... It's a must have app. https://www.bleachbit.org/download/linux