Ce contenu n'est pas disponible dans la langue sélectionnée.
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
:
yum
history
undo
id
To repeat a particular transaction, as
root
, run the following command:
yum
history
redo
id
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
-q
history
addon-info
idsaved_tx
>file_name
Once you copy this file to the target system, you can repeat the transaction by using the following command as
root
:
yum
load-transaction
file_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.