Description of problem: Upon install or upgrade, dnf removes one existing kernel even if there are fewer than installonly_limit kernels installed. Version-Release number of selected component (if applicable): $ rpm -qa \*dnf\* \*hawkey\*|sort dnf-1.0.2-3.fc22.noarch dnf-conf-1.0.2-3.fc22.noarch dnf-langpacks-0.11.1-1.fc22.noarch dnf-plugins-core-0.1.9-1.fc22.noarch dnf-yum-1.0.2-3.fc22.noarch hawkey-0.5.9-3.fc22.x86_64 python-dnf-1.0.2-3.fc22.noarch python-dnf-plugins-core-0.1.9-1.fc22.noarch python-dnf-plugins-extras-common-0.0.9-1.fc22.noarch python-dnf-plugins-extras-migrate-0.0.9-1.fc22.noarch python-dnf-plugins-extras-repomanage-0.0.9-1.fc22.noarch python-hawkey-0.5.9-3.fc22.x86_64 How reproducible: Always. Steps to Reproduce: 1. Have the following kernels installed: $ rpm -q kernel kernel-4.0.7-300.fc22.x86_64 kernel-4.0.8-300.fc22.x86_64 2. Make sure installonly_limit is more than 2: $ grep installonly /etc/dnf/dnf.conf installonly_limit=3 3. dnf upgrade or dnf install kernel Actual results: dnf tries to install kernel-4.1.3-200.fc22 (expected) and remove kernel-4.0.7-300.fc22 (not expected!) Expected results: dnf should only install the requested kernel, not remove any that are below installonly_limit.
Actually, bumping installonly_limit to 4 makes dnf keep 3 kernels as expected, so I'm suspecting an off-by-one error in the code. Could this be a duplicate of bug 1214562 or is this another issue?
Sorry for the noise. I found that I only removed kernel, but kernel-core and kernel-modules were still there, so everything works as designed.