How to remove old kernel packages

Every Ubuntu update installs a new version of the Linux kernel. It keeps the old kernel packages as backup and does not remove them. It does not mark them for autoremove either. Occasionally, I manually remove the old kernel packages keeping the current version and one older version as backup.

Thankfully, I discovered that there is a program that does this exact operation now!

Install the bikeshed package:

$ sudo apt install bikeshed

To remove all old kernel packages except the current one and the next older one:

$ sudo purge-old-kernels

Tried with: Ubuntu 15.10

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