Not delete, but fix. We need to re-install the newer versions of the packages, and this will install the correct files, and remove the older versions—bringing your system back in a consistent state where all your system wide packages are correctly installed.
I’d start with the python-gpg packages—they’re hopefully the only ones that require fixing to get dnf
back working. You’ll have to use rpm
in the meantime.
So,
- go here: gpgme-1.17.0-4.fc36 | Build Info | koji
- under the architecture you are using, download the gpgme package (looks like the only gpg related package that’s got a duplicate) to a particular directory on your system
- enter the directory where you’ve downloaded these, and reinstall the packages using
rpm -Uvh ./*.rpm
(this should work because you should already have the correct dependencies installed)
Then check if dnf
works. If it does, run a dnf reinstall <all packages that we've found duplicates of>
. That’ll re-install them, again placing the correct files and removing the older versions.
Then we’d run rpm -Va
to verify all the packages installed on the system, and fix them if required too.
A failed ugprade, as we’re seeing here, is quite an issue since it leaves the packages in an inconsistent state. There’s unfortunately no simple way of fixing this, especially if one is unlucky enough to have a broken dnf/rpm. This may not be trivial—manually solving dependencies is very hard.
The simplest “fix” here is usually a fresh install. If you have your data backed up or you’re using a separate /home
partition that you can re-use during the installation, that’s perhaps an easier, less time consuming thing to do. You can even use the re-spins to install an already fairly up to date system: