If you have been an Ubuntu for some time then you must have witnessed a Linux Kernel update. When you update the Linux Kernel, the older version still stays in the system and takes some of the disk storage. Apart from that it also cluttered Grub boot menu (newer Grub are still cleaner as they group all the older Linux Kernel together).
Whatever may be the reason if you want to get rid of the older unused Linux kernel versions, follow this simple tutorial.
Method 1: Use apt autoremove
This is the easiest possible option. All you have to do is to use the command below:
sudo apt autoremove
This apt command removes all the unnecessary packages that are not required anymore. This includes the older Linux kernel versions. In fact, this command is one of the best ways to make free space on Ubuntu.
Method 2: Use
the Software Center [Not Recommended]
This method was written when the autoremove command didn’t remove Linux kernel versions and you would see a number of Linux kernels in the Grub menu. You don’t need it anymore.
The output should contain something like 3.5.0-16-generic. This number is my current Linux version. This kernel MUST NOT be deleted. In fact, I would suggest you to keep at least one older version in case you may need it.
Now, open Ubuntu Software Center. Search for linux-image. Don’t worry if there are no search results. At the bottom of the panel, click on Show XX technical items:
This will show you the list of Linux Kernels installed in your Ubuntu system. Select any of them and click on Remove to uninstall it.
And that is it. Update your Grub to refresh it by using the following command in terminal:
Just a reboot and we got rid of old Linux Kernel versions. Cheers :)