-
Bug
-
Resolution: Unresolved
-
Major
-
rhel-10.0.beta
-
dnf-4.20.0-1.el10
-
None
-
Moderate
-
rhel-sst-cs-software-management
-
ssg_core_services
-
20
-
8
-
False
-
-
No
-
None
-
-
Pass
-
Automated
-
Bug Fix
-
-
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.
RHEL 10 (dnf-4.19.0-2.el10.noarch) is affected.
- clones
-
RHEL-15902 dnf autoremove attempts to remove installonlypkgs
- Closed
- links to
-
RHBA-2024:139489 dnf bug fix and enhancement update