-
Bug
-
Resolution: Cannot Reproduce
-
Undefined
-
None
-
rhel-9.2.0.z
-
None
-
No
-
None
-
rhel-sst-cs-software-management
-
ssg_core_services
-
None
-
False
-
-
None
-
None
-
None
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
After a leapp upgrade form RHEL 8 I'm trying to clean old kernels using
dnf remove -y --oldinstallonly
If you have multiple RHEL8 kernel only the last one is removed from the grub entries.
Please provide the package NVR for which bug is seen:
dnf-data-4.14.0-5.el9_2.noarch
libdnf-0.69.0-3.el9_2.x86_64
python3-libdnf-0.69.0-3.el9_2.x86_64
python3-dnf-4.14.0-5.el9_2.noarch
dnf-4.14.0-5.el9_2.noarch
python3-dnf-plugins-core-4.3.0-5.el9_2.noarch
dnf-plugins-core-4.3.0-5.el9_2.noarch
libdnf-plugin-subscription-manager-1.29.33.2-1.el9_2.x86_64
How reproducible:
Steps to reproduce
- grubby --info=ALL |grep -E "^index|^kernel"
- dnf remove -y --oldinstallonly
- grubby --info=ALL |grep -E "^index|^kernel"
Expected results
$ sudo grubby --info=ALL |grep -E "^index|^kernel|^title" index=0 kernel="/boot/vmlinuz-5.14.0-284.40.1.el9_2.x86_64" title="Red Hat Enterprise Linux (5.14.0-284.40.1.el9_2.x86_64) 9.2 (Plow)" index=1 kernel="/boot/vmlinuz-0-rescue-393e6edbe9234c19820b3ddb3395bfd1" title="Red Hat Enterprise Linux (0-rescue-393e6edbe9234c19820b3ddb3395bfd1) 9.2 (Plow)"
Actual results
# grubby --info=ALL |grep -E "^index|^kernel" index=0 kernel="/boot/vmlinuz-5.14.0-284.40.1.el9_2.x86_64" index=1 kernel="/boot/vmlinuz-4.18.0-305.114.1.el8_4.x86_64" index=2 kernel="/boot/vmlinuz-0-rescue-545b57993b734be1aeb3c1407928511b" index=3 kernel="/boot/vmlinuz-4.18.0-305.108.1.el8_4.x86_64" index=4 kernel="/boot/vmlinuz-0-rescue-d0f7c5e5fe614c13b03d206103f69f71" [root@overcloud-cephstorage-1 ~]# dnf repoquery --installonly Updating Subscription Management repositories. kernel-0:4.18.0-305.108.1.el8_4.x86_64 kernel-0:4.18.0-305.114.1.el8_4.x86_64 kernel-0:5.14.0-284.40.1.el9_2.x86_64 kernel-core-0:4.18.0-305.108.1.el8_4.x86_64 kernel-core-0:4.18.0-305.114.1.el8_4.x86_64 kernel-core-0:5.14.0-284.40.1.el9_2.x86_64 kernel-modules-0:4.18.0-305.108.1.el8_4.x86_64 kernel-modules-0:4.18.0-305.114.1.el8_4.x86_64 kernel-modules-0:5.14.0-284.40.1.el9_2.x86_64 kernel-modules-core-0:5.14.0-284.40.1.el9_2.x86_64 kernel-modules-extra-0:4.18.0-305.108.1.el8_4.x86_64 kernel-modules-extra-0:4.18.0-305.114.1.el8_4.x86_64 kernel-modules-extra-0:5.14.0-284.40.1.el9_2.x86_64 [root@overcloud-cephstorage-1 ~]# ^C [root@overcloud-cephstorage-1 ~]# dnf remove -y --oldinstallonly Updating Subscription Management repositories. Dependencies resolved. =========================================================================================================================================================================== Package Architecture Version Repository Size =========================================================================================================================================================================== Removing: kernel x86_64 4.18.0-305.108.1.el8_4 @koji-override-7 0 kernel x86_64 4.18.0-305.114.1.el8_4 @rhel-8-for-x86_64-baseos-tus-rpms 0 kernel-core x86_64 4.18.0-305.108.1.el8_4 @koji-override-7 67 M kernel-core x86_64 4.18.0-305.114.1.el8_4 @rhel-8-for-x86_64-baseos-tus-rpms 67 M kernel-modules x86_64 4.18.0-305.108.1.el8_4 @koji-override-7 22 M kernel-modules x86_64 4.18.0-305.114.1.el8_4 @rhel-8-for-x86_64-baseos-tus-rpms 22 M kernel-modules-extra x86_64 4.18.0-305.108.1.el8_4 @rhos-16.2-rhel-8 663 k kernel-modules-extra x86_64 4.18.0-305.114.1.el8_4 @rhel-8-for-x86_64-baseos-tus-rpms 663 kTransaction Summary =============================================================================================================================================================================================================================================================================================================================================== Remove 8 Packages Freed space: 179 M Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Erasing : kernel-4.18.0-305.108.1.el8_4.x86_64 1/8 Running scriptlet: kernel-4.18.0-305.108.1.el8_4.x86_64 1/8 Erasing : kernel-4.18.0-305.114.1.el8_4.x86_64 2/8 Running scriptlet: kernel-4.18.0-305.114.1.el8_4.x86_64 2/8 Erasing : kernel-modules-extra-4.18.0-305.108.1.el8_4.x86_64 3/8 Running scriptlet: kernel-modules-extra-4.18.0-305.108.1.el8_4.x86_64 3/8 Erasing : kernel-modules-extra-4.18.0-305.114.1.el8_4.x86_64 4/8 Running scriptlet: kernel-modules-extra-4.18.0-305.114.1.el8_4.x86_64 4/8 Erasing : kernel-modules-4.18.0-305.114.1.el8_4.x86_64 5/8 Running scriptlet: kernel-modules-4.18.0-305.114.1.el8_4.x86_64 5/8 Erasing : kernel-modules-4.18.0-305.108.1.el8_4.x86_64 6/8 Running scriptlet: kernel-modules-4.18.0-305.108.1.el8_4.x86_64 6/8 Running scriptlet: kernel-core-4.18.0-305.108.1.el8_4.x86_64 7/8 Erasing : kernel-core-4.18.0-305.108.1.el8_4.x86_64 7/8 Running scriptlet: kernel-core-4.18.0-305.108.1.el8_4.x86_64 7/8 Running scriptlet: kernel-core-4.18.0-305.114.1.el8_4.x86_64 8/8 Erasing : kernel-core-4.18.0-305.114.1.el8_4.x86_64 8/8 Running scriptlet: kernel-core-4.18.0-305.114.1.el8_4.x86_64 8/8 Verifying : kernel-4.18.0-305.114.1.el8_4.x86_64 1/8 Verifying : kernel-4.18.0-305.108.1.el8_4.x86_64 2/8 Verifying : kernel-core-4.18.0-305.114.1.el8_4.x86_64 3/8 Verifying : kernel-core-4.18.0-305.108.1.el8_4.x86_64 4/8 Verifying : kernel-modules-4.18.0-305.108.1.el8_4.x86_64 5/8 Verifying : kernel-modules-4.18.0-305.114.1.el8_4.x86_64 6/8 Verifying : kernel-modules-extra-4.18.0-305.114.1.el8_4.x86_64 7/8 Verifying : kernel-modules-extra-4.18.0-305.108.1.el8_4.x86_64 8/8 Installed products updated.Removed: kernel-4.18.0-305.108.1.el8_4.x86_64 kernel-4.18.0-305.114.1.el8_4.x86_64 kernel-core-4.18.0-305.108.1.el8_4.x86_64 kernel-core-4.18.0-305.114.1.el8_4.x86_64 kernel-modules-4.18.0-305.108.1.el8_4.x86_64 kernel-modules-4.18.0-305.114.1.el8_4.x86_64 kernel-modules-extra-4.18.0-305.108.1.el8_4.x86_64 kernel-modules-extra-4.18.0-305.114.1.el8_4.x86_64 Complete! # grubby --info=ALL |grep -E "^index|^kernel" index=0 kernel="/boot/vmlinuz-5.14.0-284.40.1.el9_2.x86_64" index=1 kernel="/boot/vmlinuz-0-rescue-545b57993b734be1aeb3c1407928511b" index=2 kernel="/boot/vmlinuz-4.18.0-305.108.1.el8_4.x86_64" index=3 kernel="/boot/vmlinuz-0-rescue-d0f7c5e5fe614c13b03d206103f69f71" [root@overcloud-cephstorage-1 ~]# dnf remove -y --oldinstallonly Updating Subscription Management repositories. Error: No old installonly packages found for removal.