You should always leave the current kernel and one previous kernel in place on your system. The previous kernel is needed if an update to the current kernel leaves your system unable to boot. You will be able to boot the previous kernel using the advanced options of the grub boot menu.

Show current kernel in use:

$ uname -r

Get list of installed kernels:

$ dpkg --list | grep linux-image

Remove old kernels one by one:

$ sudo apt-get --purge remove linux-image-xxx     

Update grub:

$ sudo update-grub2

Reboot system:

$ sudo systemctl reboot

Leave a Reply

Your email address will not be published. Required fields are marked *