Show Table of Contents
8.3.3. Reverting and Repeating Transactions
Apart from reviewing the transaction history, the
yum history command provides means to revert or repeat a selected transaction. To revert a transaction, type the following at a shell prompt as root:
yumhistoryundoid
To repeat a particular transaction, as
root, run the following command:
yumhistoryredoid
Both commands also accept the
last keyword to undo or repeat the latest transaction.
Note that both
yum history undo and yum history redo commands only revert or repeat the steps that were performed during a transaction. If the transaction installed a new package, the yum history undo command will uninstall it, and if the transaction uninstalled a package the command will again install it. This command also attempts to downgrade all updated packages to their previous version, if these older packages are still available.
When managing several identical systems, Yum also allows you to perform a transaction on one of them, store the transaction details in a file, and after a period of testing, repeat the same transaction on the remaining systems as well. To store the transaction details to a file, type the following at a shell prompt as
root:
yum-qhistoryaddon-infoidsaved_tx>file_name
Once you copy this file to the target system, you can repeat the transaction by using the following command as
root:
yumload-transactionfile_name
Note, however that the
rpmdb version stored in the file must be identical to the version on the target system. You can verify the rpmdb version by using the yum version nogroups command.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.