Wiki Navigation

Yum History Command

Near the end of 2009 (or thereabouts) a 'history' command was added to yum. The history command allows an admin to access detailed information on the history of yum transactions that have been run on a system.

Yum started keeping a sqlite db of the information from each and every transaction. The history is organized by transaction id. Each
time you perform a 'yum' command which changes your system pkgs in someway the history db is updated with this information.

The yum history dbs are normally found in /var/lib/yum/history/

Commands

yum history list [pkgname...] [transaction_id...]
a table of the transactions. It takes two optional arguments. A package name/glob and a transaction id number.

For example:

yum history list zsh
will return a table of all the transactions where the pkg 'zsh' was modified in some way.

yum history list 1 2 10
will return a table of transactions 1, 2 and 10.

with no arguments it will list the most recent 20 transactions.

yum history info [pkgname...] [transaction_id ...]

same arguments as 'list' but provides detailed information on the transaction. You may best use this piped to 'less'.

with no arguments it will display info on the most recent transaction.

The first row of this chart says that in the last 3 months transactions involving the glibc pkg were performed which modified 1873 pkgs and involved Erase, Install, Obsolete and Update operations.

with no arguments it will present a total summary of the system's history.

yum history undo [transaction_id|'last']

this will attempt to 'undo' what the specified transaction did. In many cases this is possible, but in some cases the packages yum needs to downgrade to are no longer available anywhere and therefore an undo will not succeed.

yum history redo [transaction_id|'last']

this will attempt to perform the exact same transaction specified. This does NOT do a 'reinstall' but simply performing the same
transaction again.

yum history new

creates a new yum history db, saving the old one. This command is only to let you keep the size of any single yum history database down in size. When you create a new history db the older transactions will not be accessible unless you move the new history db out of the way. You should rarely ever need to run this command.