Linux Mint – Delete old unused kernels

von

This new fancy GUI tool for removing old versions of the Linux kernel is driving me nuts. So i searched for a better option to remove the old kernel versions which the system don’t use anymore.

My options where

  • using the GUI tool which is
    • impractical
    • annoyingly slow
    • and you have to delete every kernel single handed
  • writing my own script
    • consumes time and energy I neither want to spend nor have to spend at the moment
    • needs testing which leads back to the point above
    • needs a virtual machine because i don’t test these things on a fully functional and productive machine
  • find a working solution which does what I want without me putting a lot of energy and time in it
    • ask uncle Google
    • find a working and tested solution from either the repositories on Mint or Git or Sourceforge
    • implement it and add a weekly cronjob

Installing in Mint is very simple:

~$:  sudo apt install byobu

And what a wonder running it afterwards is not much harder to do:

~$:  purge-old-kernels

After that you end up with just two kernel on your system instead of several.