When you remove a kernel, make sure to update the grub to see if any error occurs while generating the grub # update-grubįound linux image: /boot/vmlinuz-4.15.0-23-genericįound initrd image: /boot/initrd.img-4.15.0-23-genericįound memtest86+ image: /boot/memtest86+.elfįound memtest86+ image: /boot/memtest86+.bin You can remove all the old kernel with the remove parameter as below: # apt remove linux-image-4.15.0-13-generic You can check the ones which were automatically installed as belowĪnd you can check those that were manually installed as below # apt-mark showmanual 'linux-image-.*'Īs you can see, we don't have any kernel manually installed. The apt command help to uninstall packages including the old kernels that you don't need in your Ubuntu 18.04 systems.
#SHOULD I DELETE BOOT.ELF INSTALL#
Normally you install it via the regular system updates but for some reasons, you can decide to do a manual installation. There are some useful commands to remove the old kernels whether you have installed it manually or directly via the system updates. Now that we have found some kernels installed, now let's see the different methods to remove each or the totality. Make sure to see the status before doing anything. That means not installed but queued for install in apt.
You can see that you effectively have an old kernel installed marked with ii.
# dpkg -l | grep -E 'linux-image-+' | grep -Fv $(uname -r)