8.3.3. Reverting and Repeating Transactions
Apart from reviewing the transaction history, the
yum historycommand provides means to revert or repeat a selected transaction. To revert a transaction, type the following at a shell prompt as
To repeat a particular transaction, as
root, run the following command:
Both commands also accept the
lastkeyword to undo or repeat the latest transaction.
Note that both
yum history undoand
yum history redocommands only revert or repeat the steps that were performed during a transaction. If the transaction installed a new package, the
yum history undocommand 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
Once you copy this file to the target system, you can repeat the transaction by using the following command as
Note, however that the
rpmdbversion stored in the file must be identical to the version on the target system. You can verify the
rpmdbversion by using the
yum version nogroupscommand.