Kernel Headers - Older headers removed

I just recently discovered that older kernel headers are removed when I upgrade from 362 to 427. I have reason to compile in my 362 environment (and keep 427 around) but the kernel headers are removed for 362 (they exist only for 427). This isnt the case on my Ubuntu machines but I dont feel like this is a normal behavior for rhel base machines.

Yeah no, RHEL has repositories that last the entire major version, so the old packages remain available to the package manager. In Alma (and Rocky), not only does each minor release have separate repos, the old repos get moved to “vault,” so but you can’t can just dnf --releasever=9.3. If you just need the one package you can probably grab it from Index of /9.3/AppStream/x86_64/os/Packages/, but if you want DNF to do dependencies and such you’ll want to set up .repo files in /etc/yum.repos.d that point at the vault 9.3 repos.

The dnf talks to mirrorlist server and that server does return URLs with not only the 9, but also with 9.4, 9.3, … etc


Look at output of dnf rq --installonly
Those are the only packages that can be kept when newer version is available.
The headers are not on the list. They are updated with every new kernel, not just on point update.

Shows with dnf history info kernel-headers | grep kernel-headers and dnf list --showduplicates kernel-headers too.

And

# dnf -q --releasever=9.3 list --showduplicates kernel-headers
Installed Packages
kernel-headers.x86_64            5.14.0-427.22.1.el9_4             @appstream
Available Packages
kernel-headers.x86_64            5.14.0-362.8.1.el9_3              appstream 
kernel-headers.x86_64            5.14.0-362.13.1.el9_3             appstream 
kernel-headers.x86_64            5.14.0-362.18.1.el9_3             appstream 
kernel-headers.x86_64            5.14.0-362.24.1.el9_3             appstream 
kernel-headers.x86_64            5.14.0-362.24.2.el9_3             appstream

The “only one” also means that you have to remove the current kernel-headers, if you want older version. Probably use dnf downgrade


I recall someone hinting that the latest version of headers should not be a problem. I might have misunderstood, or the context was specific.

Oh, sweet! Although that sorta makes me wonder why they bother moving them.

Regarding the package itself, it was unclear to me whether jlebouef’s actual concern is (the contents of) the -headers package, that indeed would have been replaced, or the -devel package, of which the version is much more significant.

Space (the final frontier). What is kept on the main repo is synched to many sites that mirror content. If every mirror would keep all the stuff that they have ever got, they would have a lot. N copies around the world of something that nobody should use any more is waste of storage hardware.

Keeping one copy in a vault for future palaeontologists is enough, isn’t it?

1 Like