MYSYSAD.COM

Remove old Ubuntu kernel versions from /boot

· Files & disks · System & processes

I was starting to run out of room in /boot. Had about 10MB of space left. I have been dabbling with Ubuntu for a couple months and I am still learning a lot of its nuances. Seems to be a stable OS and a lot of utilities are available for it.

Determine current kernel version (do not delete this one)
uname -r

List all the installed kernels on your system
dpkg --list | grep linux-image

Find kernels below your current one and remove each one with the following command. Again, don't remove your current kernel.
sudo apt-get purge linux-image-X.X.X.X-generic

Update grub2
sudo update-grub2

Reboot system
sudo reboot