Interrupted dnf upgrade. Files conflict now

,

I accidentally closed a terminal with dnf upgrade running. After opening I tried to use the command again. Downloading packages skipped but I got a transaction test error:

Error: Transaction test error:
  file /usr/share/doc/krb5-libs/NOTICE from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/doc/krb5-libs/README from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/licenses/krb5-libs/LICENSE from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/man/man5/k5identity.5.gz from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/man/man5/k5login.5.gz from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/man/man5/krb5.conf.5.gz from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/man/man7/kerberos.7.gz from install of krb5-libs-1.21.3-1.fc39.i686 conflicts with file from package krb5-libs-1.21.2-3.fc39.x86_64
  file /usr/share/man/man5/cert9.db.5.gz from install of nss-3.104.0-1.fc39.i686 conflicts with file from package nss-3.99.0-1.fc39.x86_64
  file /usr/share/man/man5/key4.db.5.gz from install of nss-3.104.0-1.fc39.i686 conflicts with file from package nss-3.99.0-1.fc39.x86_64
  file /usr/share/man/man5/pkcs11.txt.5.gz from install of nss-3.104.0-1.fc39.i686 conflicts with file from package nss-3.99.0-1.fc39.x86_64
  file /usr/share/doc/p11-kit/NEWS from install of p11-kit-0.25.5-1.fc39.i686 conflicts with file from package p11-kit-0.25.3-1.fc39.x86_64
  file /usr/share/doc/p11-kit/README from install of p11-kit-0.25.5-1.fc39.i686 conflicts with file from package p11-kit-0.25.3-1.fc39.x86_64
  file /usr/share/man/man1/trust.1.gz from install of p11-kit-0.25.5-1.fc39.i686 conflicts with file from package p11-kit-0.25.3-1.fc39.x86_64
  file /usr/share/man/man5/pkcs11.conf.5.gz from install of p11-kit-0.25.5-1.fc39.i686 conflicts with file from package p11-kit-0.25.3-1.fc39.x86_64
  file /usr/share/man/man8/p11-kit.8.gz from install of p11-kit-0.25.5-1.fc39.i686 conflicts with file from package p11-kit-0.25.3-1.fc39.x86_64
  file /usr/share/doc/gnutls/AUTHORS from install of gnutls-3.8.6-1.fc39.i686 conflicts with file from package gnutls-3.8.5-1.fc39.x86_64
  file /usr/share/doc/gnutls/NEWS from install of gnutls-3.8.6-1.fc39.i686 conflicts with file from package gnutls-3.8.5-1.fc39.x86_64
  file /usr/share/doc/libedit/ChangeLog from install of libedit-3.1-53.20240808cvs.fc39.i686 conflicts with file from package libedit-3.1-51.20240517cvs.fc39.x86_64
  file /usr/bin/gamemodelist from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/doc/gamemode/README.md from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/gamemode/gamemode.ini from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/licenses/gamemode/LICENSE.txt from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/man/man1/gamemode-simulate-game.1.gz from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/man/man1/gamemodelist.1.gz from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/man/man1/gamemoderun.1.gz from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/man/man8/gamemoded.8.gz from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/metainfo/io.github.feralinteractive.gamemode.metainfo.xml from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/polkit-1/actions/com.feralinteractive.GameMode.policy from install of gamemode-1.8.2-1.fc39.i686 conflicts with file from package gamemode-1.7-3.fc39.x86_64
  file /usr/share/doc/gtk3/NEWS from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/locale/cs/LC_MESSAGES/gtk30.mo from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/locale/fa/LC_MESSAGES/gtk30.mo from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/locale/he/LC_MESSAGES/gtk30.mo from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/locale/hu/LC_MESSAGES/gtk30.mo from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/man/man1/broadwayd.1.gz from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/man/man1/gtk-launch.1.gz from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/man/man1/gtk-query-immodules-3.0.1.gz from install of gtk3-3.24.43-1.fc39.i686 conflicts with file from package gtk3-3.24.41-1.fc39.x86_64
  file /usr/share/doc/wavpack/wavpack_doc.html from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/licenses/wavpack/COPYING from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/man/man1/wavpack.1.gz from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/man/man1/wvgain.1.gz from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/man/man1/wvtag.1.gz from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/man/man1/wvunpack.1.gz from install of wavpack-5.7.0-3.fc39.i686 conflicts with file from package wavpack-5.6.0-4.fc39.x86_64
  file /usr/share/licenses/libimagequant/LICENSE.dependencies from install of libimagequant-4.0.3-5.fc39.i686 conflicts with file from package libimagequant-4.0.3-2.fc39.x86_64
  file /usr/share/libdrm/amdgpu.ids from install of libdrm-2.4.121-1.fc39.i686 conflicts with file from package libdrm-2.4.120-1.fc39.x86_64
  file /usr/share/doc/expat/Changes from install of expat-2.6.3-1.fc39.i686 conflicts with file from package expat-2.6.2-1.fc39.x86_64
  file /usr/share/man/man1/xmlwf.1.gz from install of expat-2.6.3-1.fc39.i686 conflicts with file from package expat-2.6.2-1.fc39.x86_64

As you can see, some files conflicts with some already installed packages.

I’ve tried:

sudo dnf clean
sudo dnf clean all
sudo dnf upgrade
sudo dnf clean packages
sudo dnf upgrade --allowerasing
sudo dnf upgrade --allowerasing --best
sudo dnf remove --duplicates
sudo dnf upgrade --best --allowerasing --refresh

Using dnf check outputs errors for 453 problems. Here is the beginning and end of the log:

Box2D-2.4.1-11.fc39.x86_64 is a duplicate with Box2D-2.4.2-1.fc39.x86_64
ImageMagick-1:7.1.1.26-2.fc39.x86_64 is a duplicate with ImageMagick-1:7.1.1.38-1.fc39.x86_64
ImageMagick-libs-1:7.1.1.26-2.fc39.x86_64 is a duplicate with ImageMagick-libs-1:7.1.1.38-1.fc39.x86_64

...many similar lines later...

yum-4.19.2-1.fc39.noarch is a duplicate with yum-4.21.1-1.fc39.noarch
zchunk-libs-1.4.0-1.fc39.x86_64 is a duplicate with zchunk-libs-1.5.1-1.fc39.x86_64
zenity-4.0.1-1.fc39.x86_64 is a duplicate with zenity-4.0.2-1.fc39.x86_64
Error: Check discovered 453 problem(s)

Please help

lpachta

Added f40

I think you need to run dnf distro-sync and maybe will need to add --allowerasing to fix this.

Thank you for anwsering :smiley:

I’ve tried using commands you suggested although it doesn’t seem to have done anything.

sudo dnf distro-sync:

Error: 
 Problem: The operation would result in removing the following protected packages: dnf, grub2-efi-ia32, grub2-efi-x64, grub2-pc, grub2-tools-minimal, systemd, systemd-udev
(try to add '--skip-broken' to skip uninstallable packages)

sudo dnf distro-sync --skip-broken:

Error: 
 Problem: The operation would result in removing the following protected packages: dnf, grub2-efi-ia32, grub2-efi-x64, grub2-pc, grub2-tools-minimal, systemd, systemd-udev

sudo dnf distro-sync --skip-broken --allowerasing:

Error: 
 Problem: The operation would result in removing the following protected packages: dnf, grub2-efi-ia32, grub2-efi-x64, grub2-pc, grub2-tools-minimal, systemd, systemd-udev

Maybe it cannot be run because one of the issues is with systemd.

There are other people here that know more about recovering from this situation then I do. I will let them reply.

Is it a big problem for you to re-install the system? I mean you can spend hours and hours on trying to solve this but in the end you are still not convinced if everything works as it should.

Backup your data and start over. In 2-3 hours you have your system running as it should run which, at least for me this is the case, gives a great feeling.

1 Like

Removed f40

Added f39

Okay, so I’ve figoured it out.

dnf distro-sync couldn’t be executed because it was supposed to remove duplicates of dnf, systemd and grub. By outputing the version of dnf dnf --version I’ve pointed out the active installed dnf package. Then I’ve removed the inactive one using rpm -e --nodeps dnf and then did the same with the other important packages.

After that I finally could have used dnf distro-sync which did something… I guess.

dnf check still outputted the same errors so I needed to remove all package duplicates. I did it using this command:

sudo rpm -e --nodeps $(sudo dnf check 2>/dev/null | grep duplicate | cut -f1 -d' ')

Because it didn’t remove the old dependencies I had to dnf reinstall every package that was outputted in new error log from dnf check.

One dnf check later and there was only one error left. It was about obsoleting packages which was resolved with reinstalling the newer package.

After that was everything clean again and I could upgrade to Fedora 40 :smiley:

Thanks to everyone who spent their time suggesting me possible fixes!

4 Likes

Glad you figured it out. We all are learning every day, even when we have years of experience behind us. :+1:

1 Like