Description of problem: dnf is not able to perform history undo if some package from transaction to be undone is not installed or installed in different version. Version-Release number of selected component (if applicable): dnf-1.1.5 How reproducible: Always Steps to Reproduce: 1.Do some transaction 2.Upgrade or remove a package installed by transaction in step 1 3.dnf history undo last Actual results: Altered package blocks undo operation Expected results: dnf should be able to perform incomplete undo operation.
you can workaround this problem by setting `keepcache=1` in `/etc/dnf/dnf.conf` *** This bug has been marked as a duplicate of bug 1218415 ***
It is not true that setting `keepcache=1` in `/etc/dnf/dnf.conf` is a solution to this problem. See: Create internal repo from packages in cache https://bugzilla.redhat.com/show_bug.cgi?id=1397174 (my original title was: dnf history undo doesn't work even with keepcache=1) `dnf history undo last` doesn't work after update (keepcache=True) https://bugzilla.redhat.com/show_bug.cgi?id=1677840 The solution offered is to use the `local` plugin. However, if you use both keepcach=1 and the local plugin, your disk space devoted to holding old packages doubles! This problem would go away if the practice of deleting old rpms from the mirrors ceased. But that idea was rejected: Don't replace packages in Fedora Updates repository - keep them all https://bugzilla.redhat.com/show_bug.cgi?id=1218415#c31 "if we kept every single rpm pushed out in the updates repos over the life of a release the mirrors would revolt and we would not be able to ship anything." So, instead of mirrors using their disk space to keep old packages, users are expected to configure the `local` plugin and use their own disk space, so that dnf's undo and rollback functionality will work as documented.