Removing old linux kernel packages

This works on dpkg based systems, so Ubuntu, Debian etc.

Now, don’t do this without knowing exactly what you’re in for. If you don’t know what kernel version you’re running or how to back up everything before you do it, please don’t come here complaining you broke your toys.

This is the final command:

I’d probably recommend running this first:

This will tell you the current kernel version that you’re running.

Make a backup of the kernel versions:

Then run the command without the removal to see what you’ll be doing:

This will show you the packages that the system will be removing. If you’re sure the list is right, then add the final part and clean up your boot directory. 🙂

Information originally found here on askubuntu. Copied and cleaned up for my own notes.



#Debian #kernel #Linux #Ubuntu