I thought it had been suggested already, but it turns out we might have a couple of elegant ways out of this mess, try them in this order:
dnf upgrade --allowerasing --best
dnf remove --duplicates
this may be of help as well, but double check what it might want to remove:
If these fail, we’ll have to try a more barbaric approach…
Create a folder someplace, e.g.
We’ll start by getting the updated packages, in case we can’t fetch them later on for whatever reason and dnf’s cache has problems.
Download the following packages in that folder:
You can save the links in a file and feed the list to your favorite download manager, e.g. with wget and assuming you named the file pkg_list and saved it in the ~/repairs/ folder:
cd repairs/ && wget -i pkg_list
This is the list of packages we want to get rid of:
Again, you can save them in a file (e.g. pkg2rem) in the same folder and use it to avoid typing everything.
Then, with the grace of a butcher wielding his cleaver, we will remove the old packages (assuming you’re inside ~/repairs/ - if not adjust the path):
for i in $(cat pkg2rem); do rpm -e --nodeps $i; done
(you need to be root, or add a sudo before rpm)
Once that’s done and while still keeping our hopes up:
rpm -U ./*.rpm
If we’ve completely removed a package in the previous step, upgrade (-U) will fail and we’ll have to use install (-i) instead for that package. You can check if it’s installed with
rpm -qi <package_name>.
Assuming that all went according to plan, at this point you can run dnf again to update the rest of the system. At first run it will complain that the package database was altered by some other means.
- I did my best not to confuse your installed packages with the updates and with the packages on my system, but something might have escaped.
- nss-3.52.0-2 has reached the stable testing threshold, so I’ve used that version instead of 3.51.1-1.
- I am not sure you need all of the i686 package versions you have installed, but I’ve included them anyway.
- If you encounter problems after you’ve updated/installed packages with rpm, you may have to fiddle with --reinstall or --freshen options.
Best of luck!