Red Hat Bugzilla – Bug 1279066
RFE: dnf don't mark running kernel for removal
Last modified: 2015-11-09 11:57:47 EST
Description of problem:
The command "dnf remove kernel", removes all kernel - including the one, that is currently active. Before F21 and also in RHEL, all kernels will be removed - except the current one. This behaviour should be back, to prevent uninstalling all kernels and can't boot any more.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have at least two kernel packages installed on your system.
2. Run "dnf remove kernel"
dnf offers to remove all kernel packages - including the one that is currently active.
dnf should skip the current active kernel for removal (like it was before F21 and also is in RHEL)
This bug was already reported for yum in Fedora 21 (Bug #1175532), but this one was closed, because F21 is EOL. I opened a new one, because meanwhile it's dnf and not yum any more.
The running kernel is never removed - protected_packages from dnf-plugins-core component reports it and halts the operation.
I digged a bit deeper and find out, that the "kernel" package doesn't contain any files (any more?):
# rpm -qlp kernel-4.2.5-300.fc23.x86_64.rpm
(enthält keine Dateien) -> in english: contains no files
I don't understand the sense of a package without files, but this shouldn't be part of this request :-)
The kernel is inside the package kernel-core. And for that, Jan's reply is correct. The active Kernel isn't removed:
# dnf remove kernel-core
Abhängigkeiten sind aufgelöst.
Fehler: The operation would result in removing the booted kernel: kernel-core-4.2.5-300.fc23.x86_64.
Sorry for the noise. I set the status to NOTABUG.