On Tue, Nov 08, 2022 at 08:03:55AM -0800, Scott Beamer wrote:
Greetings,
I recently read somewhere that there is a dnf command to finish upgrading
when an upgrade crashes during an upgrade. I tried Googling to find it just
now and have come up empty.
Does anyone know what it is?
Likely to late for you, but I was searching for how to do this today and found
your email.
I hit a similar problem twice now where my remote ssh was disconnected during a
"dnf upgrade", and I wasn't sure where in the upgrade it stopped or if it
even
finished.
These commands did nothing. Somewhat expected, but depends where in the upgrade
it failed - if it was during the download, they might be enough:
dnf upgrade
dnf history redo NN (NN being the "dnf upgrade" that did not complete)
I eneded up using dnf reinstall of all the packages involved to recover.
Check your /var/log/dnf.log to see where / how it failed, get a list of all the
installed (new kernels are installed and not actually upgraded) and upgraded
packages, and then reinstall them all.
I suggest reinstalling kernel ones separately, since those can be more critical
- in my case, the initramfs for the latest kernel was missing. Re-running dracut
or ??? with the proper arguments would have created it too, but I'm not sure of
the exact arguments required nor if dracut is the only thing that wasn't run.
Plus, I had other upgrades whose scriptlets (post install scripts that run after
the rpm is actually downloaded and installed) had not run, and no idea what
might be needed for them.
-- Patrick