If you want to undo e.g. the last transaction `dnf history` doesn't support that. Reproducible: Always Steps to Reproduce: # dnf history undo last or # dnf history undo XXX Actual Results: ~~~ # dnf history undo last Unknown argument "undo" for command "history". Add "--help" for more information about the arguments. # ~~~ or ~~~ # dnf history list ID Command line Date and time Action(s) Altered 5 dnf update -y 2023-07-26 04:38:05.000000000 346 4 dnf install rpmdevtools -y 2023-07-25 11:56:16.000000000 6 3 dnf install rpm-build -y 2023-07-25 11:31:30.000000000 26 2 dnf builddep rpmbuild/SPECS/rpm.spec --enablerepo=* -y 2023-07-25 11:27:42.000000000 328 1 dnf install dnf5-plugins -y 2023-07-25 11:25:51.000000000 21 # # dnf history undo 5 Unknown argument "undo" for command "history". Add "--help" for more information about the arguments. # ~~~ Expected Results: It should be supported like it is with dnf4: ~~~ # dnf hist list ID | Command line | Date and time | Action(s) | Altered --------------------------------------------------------------------------------------------------- 11 | install mc -y | 2023-07-26 02:34 | Install | 2 ... # dnf hist undo 11 Last metadata expiration check: 0:11:19 ago on Wed 26 Jul 2023 02:25:24 AM EDT. Dependencies resolved. =================================================================================================== Package Architecture Version Repository Size =================================================================================================== Removing: mc x86_64 1:4.8.29-1.fc38 @updates 7.1 M Removing dependent packages: slang x86_64 2.3.3-3.fc38 @fedora 1.6 M Transaction Summary =================================================================================================== Remove 2 Packages Freed space: 8.6 M Is this ok [y/N]: ~~~ Note: This functionality is often used by customers on RHELs.
This is tracked upstream: https://github.com/rpm-software-management/dnf5/issues/140
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.