How to remove old Linux kernels


Ubuntu updates Linux kernels almost every month. If you regularly update Ubuntu, you will end up with a lot of old Linux kernels.

A Linux kernel in Ubuntu is installed as four packages. They are listed here for kernel 3.13.0-43: linux-headers-3.13.0-43, linux-headers-3.13.0-43-generic, linux-image-3.13.0-43-generic and linux-image-extra-3.13.0-43-generic.

You can of course look up the latest kernel version using uname -r and then proceed to remove all the rest of the Linux kernel packages manually.

An alternative that I like is to use Ubuntu Tweak tool. It can be installed easily, as described here.

In Ubuntu Tweak, go to Janitor -> System -> Old Kernel and you will be presented with all the Linux kernel packages on your system. The current kernel will not be included here, for obvious reasons. You can now pick and choose and select what you want to remove easily from here.

Tried with: Ubuntu Tweak 0.8.7 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s