Priest_Apostate
Active Member
Before I start, I need to mention that I didn't save the list of all of the kernels that were on the system, as I figured that if I followed the directions online, that removing the old kernels would be pretty straightforward.
Having that said, I'll start:
Due to getting an error messge
I'm just recently removed a few old kernels with the "sudo dnf -y remove --oldinstallonly --setopt installonly_limit=2 kernel" command
However, I noticed conflicting information after checking to make sure that the command worked:
$ rpm -q kernel
kernel-5.14.0-427.26.1.el9_4.x86_64
$ ls /boot/vm*
/boot/vmlinuz-0-rescue-17bba723fdc04d59b9fab968ac2f25eb /boot/vmlinuz-6.10.2-1.el9.elrepo.x86_64
/boot/vmlinuz-5.14.0-427.26.1.el9_4.x86_64 /boot/vmlinuz-6.7.3-1.el9.elrepo.x86_64
$ uname -a
Linux scion1208 6.10.2-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jul 27 14:12:13 EDT 2024 x86_64 x86_64 x86_64 G
NU/Linux
I have some points of confusion regarding the readouts of those three commands:
1. I'm unsure as to why the command kept version 5.14, which was the original install - yet removed other select kernels between that, and the current version (6.10.2-1.el9.elrepo.x86_64). Shouldn't it reflect the list of kernels showing in the "ls /boot/vm*" command?
2. I figured that I interpreted the command correctly, as the man page mentioned that the "remove --oldinstallonly" parameter would include the kernel version 5.14.0, as it is the oldest version:
*************************************************
dnf [options] remove --oldinstallonly
Removes old installonly packages, keeping only latest versions and version of running kernel.
There are also a few specific remove commands remove-n, remove-na and remove-nevra that allow the specification of an exact argument in
the NEVRA format.
*************************************************
as that is the case, why is the rpm -q command not reflecting the same kernel being shown in the uname command?
This is the best that I can phrase my questions so far: as I'm unsure of how to search for "conflicting kernel versions in different Linux commands," that is the best way I've searched so far. Apologies if I am not making sense - I will try to clarify if any of this is confusing.
REFERENCE: https://centlinux.com/remove-old-linux-kernels/
Having that said, I'll start:
Due to getting an error messge
I'm just recently removed a few old kernels with the "sudo dnf -y remove --oldinstallonly --setopt installonly_limit=2 kernel" command
However, I noticed conflicting information after checking to make sure that the command worked:
$ rpm -q kernel
kernel-5.14.0-427.26.1.el9_4.x86_64
$ ls /boot/vm*
/boot/vmlinuz-0-rescue-17bba723fdc04d59b9fab968ac2f25eb /boot/vmlinuz-6.10.2-1.el9.elrepo.x86_64
/boot/vmlinuz-5.14.0-427.26.1.el9_4.x86_64 /boot/vmlinuz-6.7.3-1.el9.elrepo.x86_64
$ uname -a
Linux scion1208 6.10.2-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jul 27 14:12:13 EDT 2024 x86_64 x86_64 x86_64 G
NU/Linux
I have some points of confusion regarding the readouts of those three commands:
1. I'm unsure as to why the command kept version 5.14, which was the original install - yet removed other select kernels between that, and the current version (6.10.2-1.el9.elrepo.x86_64). Shouldn't it reflect the list of kernels showing in the "ls /boot/vm*" command?
2. I figured that I interpreted the command correctly, as the man page mentioned that the "remove --oldinstallonly" parameter would include the kernel version 5.14.0, as it is the oldest version:
*************************************************
dnf [options] remove --oldinstallonly
Removes old installonly packages, keeping only latest versions and version of running kernel.
There are also a few specific remove commands remove-n, remove-na and remove-nevra that allow the specification of an exact argument in
the NEVRA format.
*************************************************
as that is the case, why is the rpm -q command not reflecting the same kernel being shown in the uname command?
This is the best that I can phrase my questions so far: as I'm unsure of how to search for "conflicting kernel versions in different Linux commands," that is the best way I've searched so far. Apologies if I am not making sense - I will try to clarify if any of this is confusing.
REFERENCE: https://centlinux.com/remove-old-linux-kernels/