How to cleanup your /boot in Ubuntu

First check your kernel version, so you won’t delete the in-use kernel image, running:

uname -a

Now run this command for a list of installed kernels:

sudo dpkg --list 'linux-image*'

and delete the kernels you don’t want/need anymore by running this:

sudo apt-get remove linux-image-VERSION linux-image-VERSION

Replace VERSION with the version of the kernel you want to remove.

When you’re done removing the older kernels, you can run this to remove ever packages you won’t need anymore:

sudo apt-get autoremove

And finally you can run this to update grub kernel list:

sudo update-grub

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.