The latest update of Rawhide moved to dnf5. This forgot about "dnf remove -y --noautoremove ...". This option is hard to avoid -- without --noautoremove it will remove automatic dependencies (which breaks our test), and with `rpm -e` it will fail because some other (unpredictable for us) packages depend on it. Reproducible: Always Steps to Reproduce: dnf remove --noautoremove bash-doc Actual Results: Unknown argument "--noautoremove" for command "remove". Add "--help" for more information about the arguments. Expected Results: dnf removes the specified packages and packages that depend on it, but not automatic dependencies of the specified packages -- as before.
Hi, I guess this is due to "clean_requirements_on_remove" configuration option set to True by default. You can switch it off to achieve the desired behavior, either in configuration file /etc/dnf/dnf.conf like "clean_requirements_on_remove=False" or with command-line switch: "dnf5 remove bash-doc --setopt=clean_requirements_on_remove=False".
I've tried to improve our documentation with creating this PR: https://github.com/rpm-software-management/dnf5/pull/641.
Thanks for the hint about "--setopt=clean_requirements_on_remove=False". That seems to work on at least Fedora 38 as well. I'll test it in https://github.com/cockpit-project/cockpit/pull/18987 if it also works on C8S and others.
❱❱❱ podman run -it --rm quay.io/centos/centos:stream8 sh -exc 'dnf install -y bash-doc; dnf remove --setopt=clean_requirements_on_remove=False bash-doc' This actually works, nice! So we have a command that continues to work everywhere. That plus the doc update seems fine to me, thanks!
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.