The thing that bugs me the most when Ubuntu gets updated with a new kernel is my grub gets new items in the list to choose from. This may not be irritating or problematic to many but I find it messy.
Its quite simple to remove the unused kernel updates both from the system and from the grub menu. Before doing that, it’s very important that we don’t remove a kernel which some application/component is dependent on, normally this isn’t the case, but it can happen. Also, to be on the safer side, I would advice to keep the current/latest kernel update and one of the previous updates.
To check the kernel in use, run:
$ uname -r
Now to see the list of kernels currently installed:
$ cd /boot
$ ls vmlinuz*
From the list identify the kernel version to be removed, and run:
$ sudo apt-get remove linux-image-<version1>-generic linux-image-<version2>-generic … …
Once the above process completes, just run the following to update grub:
$ sudo update-grub
Reboot and that’s it.