Skip to content

Instantly share code, notes, and snippets.

@alberand
Last active June 26, 2023 09:55
Show Gist options
  • Save alberand/f36550dbd8e679e33a4acbae586fd921 to your computer and use it in GitHub Desktop.
Save alberand/f36550dbd8e679e33a4acbae586fd921 to your computer and use it in GitHub Desktop.
Fedora - DNF fails to update itself

If you get following error while running dnf update or dnf upgrade:

Problem: The operation would result in removing the following protected packages: dnf

Then, it could be solved by installing newer version of dnf by explicitily specifying the version. Find out which version you need:

> dnf info dnf
...
Available Packages
Name         : dnf
Version      : 4.16.1  <<<<<<
Release      : 2.fc39
Architecture : noarch
...

Install it:

> dnf install dnf-4.16.1

Now you should be able to update/upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment