su6.nl / Projects

ncdu for
your kernels.

Browse installed and available Linux kernels, see which one is running, and preview package changes before applying them.

For Debian and Ubuntu, including servers over SSH.

Try without installing
uv tool run --python /usr/bin/python3 kerntop

Requires Python 3.11+ with matching python3-apt bindings.

kerntopExample data / amd64
Root mode: previews and immediate package actions are available.
Build / flavourStateInstalledCandidateHeaders
6.8.0-49-genericRUNNING6.8.0-49.496.8.0-49.496.8.0-49-generic
6.8.0-45-genericinstalled6.8.0-45.456.8.0-45.456.8.0-45-generic
6.8.0-51-genericavailable-6.8.0-51.526.8.0-51-generic

Kernel series 6.8: 3 builds; showing recommended variants. Press Enter for actions.

h Helpr Reload cachea Toggle variantsp Preview removalq Queue removalEsc Back / quit

Watch out: kerntop can run real apt-get transactions as root. Preview the transaction and read its confirmation before applying.

Manage kernels over SSH with a TUI.

Browse by series and build using the arrow keys. Enter opens the actions for the selected kernel.

Filter kernel variants

The recommended view follows your running kernel's flavour and hides debug packages. Press a to include unsigned, cloud, RT and debug variants.

Preview with apt

Preview a contextual action using apt-get --simulate. Queue several changes and review them as one apt transaction.

Protect the running kernel

The running kernel and meta packages cannot be removal targets. Fallback warnings make the consequences visible before confirmation.

Installation

Use a Debian- or Ubuntu-based system with Python 3.11 or newer. No graphical desktop or graphical libraries are needed.

  1. Install python3-apt

    kerntop uses Debian's python3-apt bindings, which are compiled for your system Python at /usr/bin/python3. That is why every command below selects that Python explicitly.

    sudo apt-get install python3-apt
  2. Try it out

    Run kerntop once in a temporary environment, without installing it.

    uv tool run --python /usr/bin/python3 kerntop# oruvenv run --python /usr/bin/python3 kerntoppipx run --python /usr/bin/python3 kerntop
  3. Install it

    Install kerntop as a command on your path.

    uv tool install --python /usr/bin/python3 kerntop# oruvenv install --python /usr/bin/python3 kerntoppipx install --python /usr/bin/python3 kerntop

    Prefer plain pip? Run pip install kerntop inside a virtual environment created with /usr/bin/python3. kerntop reports an error if the bindings are missing or the Python versions do not match.

Usage

$ kerntop

Start read-only. Press e to restart through sudo when you need package actions.

$ kerntop -e

Start through sudo with previews and package actions enabled. You can also run sudo kerntop.

When elevating, kerntop closes before sudo asks for your password, using the normal terminal prompt over SSH.

Refresh available kernels

Press r in root mode to refresh apt repository indexes and reload package state. In read-only mode, it reloads the local cache without contacting repositories.

Install a kernel

Select an available build and press p to preview installation, then i to install after confirmation. The transaction includes available matching headers that are not already installed.

Example: review an older installed build

  1. Open the 6.8 series. Use the arrow keys and Enter to find its builds. The example system runs 6.8.0-49-generic.
  2. Select 6.8.0-45-generic. In root mode, press p to preview its removal. Check apt's proposed changes before deciding.
  3. Review the fallback warning. In this example, removing -45 would remove the final non-running fallback. kerntop warns; keeping it is a valid decision.
  4. For several changes, use the queue. Press q on contextual targets, then c to review. Simulate the combined transaction before final confirmation.

Remove keeps the image package's configuration; purge removes it too. The running kernel and kernel meta packages cannot be selected for removal or purge. Removing your final non-running fallback requires a warning and confirmation.

While apt-get is running, Ctrl + C requests a graceful interruption. Its output stays visible.

Header cleanup

Press u from the main browser, or start with kerntop -u, to review unused development headers and kernel-support packages. To start that review with root controls enabled:

kerntop -eu

Review explicit packages, such as linux-headers-6.5.0-14-generic, before confirming cleanup. kerntop never runs autoremove automatically.

Key reference

Press h inside kerntop, or start with kerntop --help, to open Help. Previews, queues and package changes require root.

Navigation and contextual actions
Up DownChoose a row.
EnterOpen a series, build or its valid actions.
Esc / LeftBack to the series list. Esc twice there quits.
aToggle recommended and all variants without reloading the cache.
pPreview contextual installation or removal with apt-get --simulate.
q / cQueue a contextual action / review the queue.
iInstall an available kernel image after confirmation.
dRemove an installed, non-running image after confirmation.
uReview unused headers and support packages in the main browser.
eRestart through sudo from a read-only session.
rRefresh repositories and reload the cache in root mode; reload only the local cache otherwise.
Ctrl + CRequest a graceful interruption of an active apt-get command; quit when no command is running.
hOpen help.