Red Hat Bugzilla – Bug 1475874
dnf upgrade does not remove old kernel although installonly_limit is exceeded
Last modified: 2017-07-27 10:40:11 EDT
Description of problem:
In /etc/dnf/dnf.conf installonly_limit=2 is set. Nevertheless, 3 Kernel Versions are installed.
Version-Release number of selected component (if applicable):
Set installonly_limit=2 in /etc/dnf/dnf.conf
sudo dnf upgrade
Steps to Reproduce:
3 installed kernel versions
removing kernel-4.11.8-300 ....
dnf list | grep kernel ->
kernel.x86_64 4.11.8-300.fc26 @anaconda
kernel.x86_64 4.11.10-300.fc26 @updates
kernel.x86_64 4.11.11-300.fc26 @updates
The oldest unbooted kernel will be removed only if in transaction will be the kernel. That means if there will be new kernel update available and you will update kernel, then instead of removal 1 kernel packages, two of them will be removed. The behavior was changed, because other users did not like, that if they install something, it also removes kernels over limit. Please if I did not understand well your problem, don't hesitate to reopen the bug report.