I recently upgraded to f36 from 35. I tried to update the kernel but I had two kernels from f35 still installed which apparently caused conflicts and the update fails. I followed the post-upgrade cleanup steps and the script from the
official docs but the scipt outputs Error: Problem: The operation would result in removing the following protected packages: kernel-core Failed to remove old kernels
$uname -a: Linux localhost 5.17.9-300.fc36.x86_64 #1 SMP PREEMPT Wed May 18 15:08:23 UTC 2022 x86_64 x86_6 4 x86_64 GNU/Linux
Output of #dnf update kernel:Error: Problem: package kernel-modules-extra-5.17.11-300.fc36.x86_64 requires kernel-uname-r = 5.17.11-300.fc36.x86_64, but none of the providers can be installed \- conflicting requests (try to add '--skip-broken' to skip uninstallable packages)
I managed to remove the old kernels by #yum remove <kernel name> but the issue persists.
Yes, I am unable to update.
currently installed kernels:
kernel-5.17.9-300.fc36.x86_64
kernel-5.17.11-300.fc36.x86_64. (earlier I had two extras from f35)
kernel is a meta-package that triggers the install of kernel-core,kernel-modules.
[rj@rawhide ~]$ dnf repoquery -l kernel
Package kernel-5.16.20-200.fc35.x86_64 contains no files
Package kernel-5.17.8-300.fc36.x86_64 contains no files
Package kernel-5.18.10-200.fc36.x86_64 contains no files
Package kernel-5.18.11-200.fc36.x86_64 contains no files
Package kernel-5.18.13-200.fc36.x86_64 contains no files
Package kernel-5.18.16-200.fc36.x86_64 contains no files
Package kernel-5.18.9-200.fc36.x86_64 contains no files
Removing kernel doesn’t trigger the removal of kernel-core, kernel-modules, kernel-modules-extra, kernel-devel, kernel-devel-matched.
The user has to manually remove at the minimum kernel-core which will autoremove kernel and kernel-modules due to it’s dependency.
Removing only kernel Freed space: 0
[rj@rawhide ~]$ sudo dnf remove kernel-5.17.8-300.fc36
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Removing:
kernel x86_64 5.17.8-300.fc36 @_dnf_local 0
Transaction Summary
================================================================================
Remove 1 Package
Freed space: 0
Is this ok [y/N]:
Operation aborted.
Removing kernel-core autoremoves kernel and kernel-modules Freed space: 141 M
[rj@rawhide ~]$ sudo dnf remove kernel-core-5.17.8-300.fc36
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
kernel-core x86_64 5.17.8-300.fc36 @_dnf_local 89 M
Removing dependent packages:
kernel x86_64 5.17.8-300.fc36 @_dnf_local 0
kernel-modules x86_64 5.17.8-300.fc36 @_dnf_local 52 M
Transaction Summary
================================================================================
Remove 3 Packages
Freed space: 141 M
Is this ok [y/N]:
All other kernel packages such as devel, modules-extra have to be manually removed to save space but they wouldn’t block installing a new kernel.