Page 1 of 1

kittykernel - a little GUI for managing kernels

Posted: Fri Aug 18, 2017 3:25 pm
by Schallaven

I wrote myself a little tool for managing kernels on Mint (and another Ubuntu machine actually) and thought maybe someone else might also find it handy. Thus, I am sharing :) Find the tool at:

  • Manages kernels with a handy GUI
  • Can install all kernels available in repos (e.g. low-latency)
  • Can remove and/or purge multiple kernels to clean up /boot (this was actually the driving point for writing this)
  • If available: scrolls to the currently selected kernel in the changelog
  • Convinces users by using an alliteration for its name
At the moment it uses synaptic for installing packages (it provides a handy interface to have progress-dialogs, etc), but that might change in future.


Re: kittykernel - a little GUI for managing kernels

Posted: Fri Aug 18, 2017 3:39 pm
by Pjotr
Sounds cool! :)

When it comes to removing old kernels, in what respects does it differ from purge-old-kernels?

Code: Select all

#    purge-old-kernels - remove old kernel packages
#    Copyright (C) 2012 Dustin Kirkland <>
#    Authors: Dustin Kirkland <>
#             Kees Cook <>
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, version 3 of the License.
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <>.

# Ensure we're running as root
if [ "$(id -u)" != 0 ]; then
	echo "ERROR: This script must run as root.  Hint..." 1>&2
	echo "  sudo $0 $@" 1>&2
	exit 1

# NOTE: This script will ALWAYS keep the currently running kernel
# NOTE: Default is to keep 2 more, user overrides with --keep N
# NOTE: Any unrecognized option will be passed straight through to apt
while [ ! -z "$1" ]; do
	case "$1" in
			# User specified the number of kernels to keep
			shift 2
			shift 1

# Build our list of kernel packages to purge
CANDIDATES=$(ls -tr /boot/vmlinuz-* | head -n -${KEEP} | grep -v "$(uname -r)$" | cut -d- -f2- | awk '{print "linux-image-" $0 " linux-headers-" $0}' )
for c in $CANDIDATES; do
	dpkg-query -s "$c" >/dev/null 2>&1 && PURGE="$PURGE $c"

if [ -z "$PURGE" ]; then
	echo "No kernels are eligible for removal"
	exit 0

apt $APT_OPTS remove --purge $PURGE

Re: kittykernel - a little GUI for managing kernels

Posted: Fri Aug 18, 2017 11:36 pm
by Schallaven
For me, I moved from 4.4 through 4.8 to 4.10 now, and might in future go to 4.11 (actually waiting for 4.12). I wanted to keep always the last generation/line of kernels, prior to my current one. So, if I want just to purge 4.4-line, I can do that by right clicking on 4.4, choose the respective option, and done. As far as I can see, the script does not do this.

In future, I want to add some handy features like "hiding this line", so I don't see anything from 4.4 anymore, for example. Small, handy things (or look for example that it shows the /boot size and the current kernel above the list, etc.)

But in the end, you can always ask such things as "Why do people use software manager instead of apt-get install?" or similar. Because people differ in taste and requirements. Same here, I think :)

Re: kittykernel - a little GUI for managing kernels

Posted: Sat Sep 02, 2017 7:46 pm
by mrmajik45
Cool Program! If you learn a bit more about linux you might be able to use something as than synaptic for the installer
:D :D :D