I have a system that repeatedly fails during upgrades using dnf
It has been having with various errors, including failure of gpg check and file conflicts that halt the upgrade.
While trying to fix those errors I decided to do a 100% reinstall since more than 3/4 of the installed packages still showed as originating from the “unknown” repo. (this system was recently upgraded from f40)
The reinstall began hanging with post install scriplets for differing selinux packages. After waiting more than an hour for the scriplets to end I wound up doing a forced reboot from an ssh session, but it still does the same.
Further investigation reveals that apparently the reinstalled packages as well as the original are now showing as duplicates. Distro-sync also does not work, with the same symptoms.
This is a small part of the dnf list --showduplicates --installed
output.
zimg.x86_64 3.0.5-3.fc41 <unknown>
zimg.x86_64 3.0.5-3.fc41 <unknown>
zip.x86_64 3.0-41.fc41 <unknown>
zip.x86_64 3.0-41.fc41 <unknown>
zix.x86_64 0.4.2-2.fc41 <unknown>
zix.x86_64 0.4.2-2.fc41 <unknown>
zlib-ng.x86_64 2.1.7-3.fc41 <unknown>
zlib-ng.x86_64 2.1.7-3.fc41 <unknown>
zlib-ng-compat.i686 2.1.7-3.fc41 fedora
zlib-ng-compat.x86_64 2.1.7-3.fc41 <unknown>
zlib-ng-compat.x86_64 2.1.7-3.fc41 <unknown>
zlib-ng-compat-devel.x86_64 2.1.7-3.fc41 <unknown>
zram-generator.x86_64 1.1.2-12.fc41 <unknown>
zram-generator-defaults.noarch 1.1.2-12.fc41 <unknown>
zstd.x86_64 1.5.6-2.fc41 <unknown>
zstd.x86_64 1.5.6-2.fc41 <unknown>
zvbi.x86_64 0.2.42-1.fc41 <unknown>
zvbi.x86_64 0.2.42-1.fc41 <unknown>
zxcvbn-c.x86_64 2.5-3.fc41 <unknown>
zxcvbn-c.x86_64 2.5-3.fc41 <unknown>
zxing-cpp.x86_64 2.2.1-2.fc41 <unknown>
zxing-cpp.x86_64 2.2.1-2.fc41 <unknown>
I see 4120 lines in that output.
How can I clean this up, verify that all packages have been installed by dnf5, and get this server back in operation?
@vgaetera I know you have had many solutions to this type problem. Any advice here?
EDIT
The command dnf repoquery --duplicates
returns 1422 results.