Bug 1984207 - dnf history undo
Summary: dnf history undo
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 34
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-21 00:12 UTC by Brent R Brian
Modified: 2021-07-21 06:03 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-07-21 06:03:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Brent R Brian 2021-07-21 00:12:42 UTC
$ sudo dnf history undo 344
Last metadata expiration check: 0:44:13 ago on Tue 20 Jul 2021 07:12:57 PM EDT.
Error: The following problems occurred while running a transaction:
  Cannot find rpm nevra "gnucash-4.6-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-dri-drivers-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-filesystem-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libEGL-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libGL-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libGL-devel-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libOSMesa-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libgbm-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libglapi-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-libxatracker-21.1.4-1.fc34.x86_64".
  Cannot find rpm nevra "mesa-vulkan-drivers-21.1.4-1.fc34.x86_64".

Several times I have tried to remove BAD UPDATES with no success.

Comment 1 Marek Blaha 2021-07-21 06:03:15 UTC
This is usually due to the fact that Fedora Updates repository only contains the latest versions of released updates. Consider following transactions:

1. install gnucash-0:4.4-1.fc34.x86_64 from Fedora repo
2. update to gnucash-0:4.6-1.fc34.x86_64 from Fedora Updates
3. update to gnucash-0:4.6-2.fc34.x86_64 from Fedora Updates

Now if you wanted to undo the transaction #3 it would mean downgrading the gnucash package to version 4.6-1. But this package is no longer present in repositories (because it was replaced by newer 4.6.-2 update), thus the error message - Cannot find rpm nevra "gnucash-4.6-1.fc34.x86_64".

You can kind of workaround it by using `local` plugin (dnf install dnf-plugin-local) which will automatically maintain a repository on the local filesystem containing all the packages dnf ever downloaded (also updates no longer present in official repositories). See https://dnf-plugins-core.readthedocs.io/en/latest/local.html for the documentation.

The other possibility is to find older build of the package in koji (e.g. https://koji.fedoraproject.org/koji/buildinfo?buildID=1776354 for gnucash) and download and install it manually.

But from dnf perspective this is not a bug - we cannot install package that is not available. Please do not hesitate to re-open the bug if the cause was different in your case.


Note You need to log in before you can comment on or make changes to this bug.