Help! System stuck with two versions of packages after late failed upgrade

If you end up with my problem this should work:

  • backed up the repo files /etc/yum.repos.d/
  • hard-coded the old release version in to the repo files in /etc/yum.repos.d/
  • ran sudo dnf distro-sync again and identified each package it complained about
  • ran dnf reinstall for all packages which were duplicated, effectively rolling them all back to the old release.
  • I had to forcibly remove one package which was duplicated, shim-x64 the UEFI bootloader by commenting it out in /etc/dnf/protected.d/shim.conf then reinstalling the older version from the old release (this PC boots from BIOS anyway so worst-case it should have still booted)
  • stopped the primary application from starting by disabling the systemd unit
  • I then ran distro-sync again, which now pulled my version down to the old release (33 in this case)
  • rebooted and it came back up
  • restored the original files from /etc/yum.repos.d/
  • ran through the upgrade process again (with more available space in /var)
  • The transaction test failed with a bunch of sssd related packages and some xorg packages. I am not using sssd on this system, it’s only got local auth, so I removed the sssd and sssd-common package.
  • run the upgrade process again by following the documentation

I actually forgot the step to restore the original repo files(!), so I accidentally “upgraded” back to the older release. This caused the system to be unbootable, breaking something under /boot as no kernel nor the recovery option booted.
I booted of a live image, set up the chroot as per the instructions and had a pain of a time trying to recover missing libraries and packages, most in /usr/lib64/ but I ended up copying them from the live image’s copy just to get by. Fortunately after some mucking around I was able to fully update all the packages to the old release (33) then go through the upgrade process in the chroot. The system rebooted and it’s now in the new release.
No doubt I have a lot of mess to clean.

1 Like