-
Bug
-
Resolution: Done-Errata
-
Major
-
rhel-8.8.0.z, rhel-9.2.0.z
-
dnf-4.14.0-11.el9
-
None
-
Moderate
-
sst_cs_software_management
-
ssg_core_services
-
10
-
12
-
8
-
False
-
-
Yes
-
None
-
-
Pass
-
Automated
-
Bug Fix
-
-
Done
-
None
What were you trying to do that didn't work?
`dnf autoremove` attempts to remove installonlypkgs
Please provide the package NVR for which bug is seen:
dnf-4.7.0-16.el8_8.noarch
libdnf-0.63.0-14.el8_8.x86_64
dnf-plugins-core-4.0.21-19.el8_8.noarch
dnf-4.14.0-5.el9_2.noarch
dnf-plugins-core-4.3.0-5.el9_2.noarch
libdnf-0.69.0-3.el9_2.x86_64
Steps to reproduce
- `dnf autoremove` > identify a package that will be removed
- `echo "installonlypkgs=that-package" >> /etc/dnf/dnf.conf
- `dnf autoremove` > still attempts to remove the package
Expected results
Packages listed in installonlypkgs are never automatically removed by this command.
man dnf Autoremove Command Command: autoremove Aliases for explicit NEVRA matching: autoremove-n, autoremove-na, autoremove-nevra dnf [options] autoremove Removes all "leaf" packages from the system that were originally installed as dependencies of user-installed packages, but which are no longer required by any such package. Packages listed in installonlypkgs are never automatically removed by this command.
Actual results
Note:
This came up when a customers dnf autoremove command attempted to remove kernel packages. Our only suspicion is that they ran dnf mark remove on the kernel packages, which then allowed dnf to `autoremove` them. But that shouldn't be the case regardless as these are installonlypkgs.
- is cloned by
-
RHEL-33534 dnf autoremove attempts to remove installonlypkgs
- Planning
- links to
-
RHBA-2024:131112 dnf bug fix and enhancement update