DNF transactions

Hello. Installed Fedora 32. There was a power failure during the update.
I looked at the details of this transaction (with identifier 13) and saw that some of the packages were updated and some were not. For example, yum history info 13 ouput

** Upgrade autocorr-en-1: @updates
Upgrade bind-libs-32:9.11.18-1.fc32.x86_64 @updates

yum list installed bind-libs-32 output

bind-libs.x86_64 32:9.11.17-1.fc32 @anaconda
bind-libs.x86_64 32:9.11.18-1.fc32 @updates

Do I understand correctly that string without ** symbol indicates that the package update was successful? And now I have two packages of different versions on my system because the transaction did not complete successfully and the cleaning stage did not occur? In my understanding, a transaction is an operation that is performed completely or not at all in case of an error.

1 Like

@cr4zsci hello, have a nice time in Fedora here.
YOu could use
dnf with '-b, --best`
that means:
Try the best available package versions in transactions. Specifically during [dnf upgrade] which by default skips over updates that can not be installed for dependency reasons, the switch forces DNF to only consider the latest packages. When running into packages with broken dependencies, DNF will fail giving a reason why the latest version can not be installed.

you will read more on updates on https://dnf.readthedocs.io/en/latest/command_ref.html

Welcome @cr4zsci to the Fedora Community!
If you’ve not had a chance yet, please look at the #start-here category. It has some very useful information on using the forum and tips on Fedora usage.

sudo dnf history undo 13 

would revert the changes made in transaction 13.

However, I would simply do a

sudo dnf distro-sync

to bring your system back in sync with the packages available in repos.
(Sorry, no idea what the ** mean)

I would say so.

But if you plug the power before the system can evalute if the transaction was sucessful…?! How to revert the transaction with no power?

1 Like

I tried but the operation fails with an error saying that one of the packages from the transaction was not installed

These were thoughts from the world of databases. Transaction successful - commit. Error - rollback. I thought that there is a mechanism like this. Misleading name ))

dnf upgrade
dnf remove --duplicates

This solved the problem.

This is what Silverblue does BTW. If the update is successful, you boot into the updated system, if it fails, you still have your old system untouched AFAIK.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.