Kernel cleanup on TW

I notice kernels aren’t properly cleaned up:

❯ zypper purge-kernels
Reading installed packages...

Preparing to purge obsolete kernels...
Configuration: latest,latest-1,running
Running kernel release: 6.14.6-1-default
Running kernel arch: x86_64

Resolving package dependencies...
Nothing to do.

This should mean, system is running latest kernel. Latest-1 is 6.14.5 so anything older should be gone. But no:

❯ ll
Permissions Size User Date Modified Name
drwxr-xr-x@    - root 19 May 14:12   6.14.4-1-default
drwxr-xr-x@    - root 19 May 14:12   6.14.5-1-default
drwxr-xr-x@    - root 19 May 14:12   6.14.6-1-default

Latest-2 is still there. But maybe it is only these files. Not really, looking at the pre-update snapshot:

❯ sudo sdbootutil list-kernels 1825
ok /lib/modules/6.14.6-1-default/vmlinuz -> opensuse-tumbleweed-6.14.6-1-default-1825.conf
ok /lib/modules/6.14.4-1-default/vmlinuz -> opensuse-tumbleweed-6.14.4-1-default-1825.conf
ok /lib/modules/6.14.5-1-default/vmlinuz -> opensuse-tumbleweed-6.14.5-1-default-1825.conf

Thus I can still boot a snapshot on 6.14.4.

Let’s check /lib/modules to see what is actually installed:

❯ ll
Permissions Size User Group Date Modified Name
drwxr-xr-x@    - root root  19 May 14:09   .
dr-xr-xr-x@    - root root  19 May 14:08   ..
drwxr-xr-x@    - root root  12 May 13:26   6.14.3-1-default
drwxr-xr-x@    - root root  19 May 14:15   6.14.4-1-default
drwxr-xr-x@    - root root  19 May 14:10   6.14.5-1-default
drwxr-xr-x@    - root root  19 May 14:10   6.14.6-1-default

So if I hadn’t manually cleaned up /boot/efi, I could still boot 6.14.3 which is latest-3. Yet it still thinks nothing is wrong when running zypper purge-kernels.

This is not as it should, no? If for some reason it is, how do I get to just keep 2 kernel versions, latest and previous? This to the default size of /boot/efi of 600MiB which is a bit limited to keep many kernel versions laying around. I currently housekeep manually as more than 4 kernels will fail an update due to lack of space.

Using sdboot, if that matters.

I bet that you have some extra modules installed (Nvidia? VirtualBox?..) and the 6.14.3 and 6.14.4 dirs just contain /updates that just contain said modules.
If that is the situation, you have to manually remove them (ensuring that you already have the relevant modules built for the n and n-1 kernels) since “purge-kernels” does not clean up -kmp packages AFAIK.

Usually i do edit: /etc/zypp/zypp.conf
After a bit of scrolling there is a line: multiversion.kernels = latest,running
Originally there is 1 or 2 more words (something like running-1), so when i do it latest,running it keeps for me only 1 kernel version. When there is a new kernel after zypper dup, after restart of the PC it removes the older one after boot, it happens it the background by the way.