I have a problem with getting rid of older kernels, and need help please.
When I run a dnf update which provides a newer kernel, the number of kernels in /boot increases.
Before I started tinkering to try to resolve this, I had instances of dnf update ending with a “fail”.
While I have been running Fedora continuously for around 25 years, my knowledge of kernels remains very limited. I’m now well into old age (77).
The Lenovo m73 series PC I’m using has been running and updating Fedora since I bought it around 20 years ago.
My latest routine kernel update resulted in dnf ending without an error at termination. But during that update, I got a warning about only having 1% disk space left in /boot
So I deleted all “6.17.10-300.fc43.x86_64” files from /boot to free up some space for the time being.
Along the way, I got this error from dnf update:
file /usr/src/kernels/6.17.7-300.fc43.x86_64: remove failed: No such file or directory
I recently used dnf and rpm to get rid of that kernel from the system. But a memory of it obviously remains, and I see it’s mentioned in a couple of files in /boot
sudo grep -r "6.17.7" /boot
/boot/System.map-6.17.12-300.fc43.x86_64:ffffffff82651787 d str__rcu__trace_system_name
/boot/System.map-6.17.11-300.fc43.x86_64:ffffffff82651787 d str__rcu__trace_system_name
Here are some other results from my system as it now stands:
rpm -qa kernel\* | sort -V
kernel-core-6.17.12-300.fc43.x86_64
kernel-core-6.18.3-200.fc43.x86_64
kernel-core-6.18.4-200.fc43.x86_64
kernel-devel-6.17.12-300.fc43.x86_64
kernel-devel-6.18.3-200.fc43.x86_64
kernel-devel-6.18.4-200.fc43.x86_64
kernel-headers-6.18.3-200.fc43.x86_64
kernel-modules-6.17.12-300.fc43.x86_64
kernel-modules-6.18.3-200.fc43.x86_64
kernel-modules-6.18.4-200.fc43.x86_64
kernel-modules-core-6.17.12-300.fc43.x86_64
kernel-modules-core-6.18.3-200.fc43.x86_64
kernel-modules-core-6.18.4-200.fc43.x86_64
kernel-modules-extra-6.17.12-300.fc43.x86_64
kernel-modules-extra-6.18.3-200.fc43.x86_64
kernel-modules-extra-6.18.4-200.fc43.x86_64
kernel-srpm-macros-1.0-27.fc43.noarch
kernel-tools-6.18.4-200.fc43.x86_64
kernel-tools-libs-6.18.4-200.fc43.x86_64
ls -l /boot/vmlinuz*
-rwxr-xr-x. 1 root root 5139320 Feb 22 2014 /boot/vmlinuz-0-rescue-03f8b18c211b41a49cd09532d25807bc
-rwxr-xr-x. 1 root root 18180136 Dec 8 11:00 /boot/vmlinuz-6.17.11-300.fc43.x86_64
-rwxr-xr-x. 1 root root 18184232 Dec 13 11:00 /boot/vmlinuz-6.17.12-300.fc43.x86_64
-rwxr-xr-x. 1 root root 18348072 Jan 2 11:00 /boot/vmlinuz-6.18.3-200.fc43.x86_64
-rwxr-xr-x. 1 root root 18343976 Jan 8 11:00 /boot/vmlinuz-6.18.4-200.fc43.x86_64
ls -l /lib/modules
total 20
drwxr-xr-x. 7 root root 4096 Dec 10 06:58 6.17.10-300.fc43.x86_64
drwxr-xr-x. 7 root root 4096 Dec 14 12:20 6.17.11-300.fc43.x86_64
drwxr-xr-x. 7 root root 4096 Jan 8 06:52 6.17.12-300.fc43.x86_64
drwxr-xr-x. 7 root root 4096 Jan 9 06:56 6.18.3-200.fc43.x86_64
drwxr-xr-x. 7 root root 4096 Jan 12 06:26 6.18.4-200.fc43.x86_64
I’m reluctant to go further without understanding what I’m doing, for fear of breaking things irrepairably. I don’t want to take a scatter-gun approach to trying powerful commands I don’t understand the consequences of.