eclean-kernel
eclean-kernel copied to clipboard
Do not remove kernels with versions greater than the currently running kernel
Now algorithm preserving currently running kernel. But if a new kernel is installed, but the system has not yet been booted into it, then it will be removed after running this script.
I believe the --num
argument kinda already implements what you want:
-n NUM, --num NUM Leave only newest NUM kernels (see also: --sort-order)