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.