Admin-Ahead Community

General Category => General Discussion => Topic started by: Vinil on January 01, 2014, 07:21:33 pm

Title: Yum History
Post by: Vinil on January 01, 2014, 07:21:33 pm
We can see detailed information on the history of yum transactions such as installations, updates, deleted packages, and other information. The yum command has history option on the latest version of CentOS / RHEL v6.x+. To database are normally found in /var/lib/yum/history/ directory.

Prerequisite

You need yum version 3.2.xx or CentOS/RHEL 6.x. Verify this with the following command:

Code: [Select]
# yum info yum | grep --color Version
Version     : 3.2.29


Yum history command syntax


Quote
root@vps [~]# yum history

Loaded plugins: fastestmirror
ID     | Login user                 | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    19 | root <root>              | 2013-12-31 09:47 | Install        |    3   
    18 | root <root>              | 2013-12-31 09:47 | Update       |    1 P<
    17 | root <root>              | 2013-12-31 09:19 | Update       |    4 >
    16 | root <root>              | 2013-12-31 09:05 | Install        |    3 P<
    15 | root <root>              | 2013-12-31 09:00 | Install        |    2 ><
    14 | root <root>              | 2013-12-27 07:45 | Install        |    1 ><
    13 | root <root>              | 2013-12-23 11:24 | Install        |    2 >
    12 | root <root>              | 2013-12-23 11:22 | Install        |    1 P<
    11 | root <root>              | 2013-12-23 11:08 | Install        |    9 ><
    10 | root <root>              | 2013-12-23 10:43 | I, O, U       |  202 ><
     9 | 2002                          | 2012-12-21 15:54 | Update       |   33 ><
     8 | 2034                          | 2012-09-20 15:42 | Update       |    3 ><
     7 | 2034                          | 2012-09-20 15:11 | Install        |    1 ><
     6 | 2034                          | 2012-09-20 13:38 | Install        |  113 >
     5 | 2034                          | 2012-09-20 13:23 | I, U            |  100 EE
     4 | 2034                          | 2012-09-20 13:22 | Install        |    1   
     3 | 2034                          | 2012-09-20 13:19 | Install        |   41   
     2 | 2034                          | 2012-09-20 13:05 | Install        |    1 P<
     1 | 2002                          | 2012-07-06 09:17 | Install        |  265 >
history list


Where,

ID - Transaction number.
Login user - The name of the user whose login session was used to initiate a yum.
Date and time - The date and time when a transaction was issued by yum.
Action(s) - A list of actions that were performed during a transaction as follows:
D or Downgrade - Package has been downgraded to an older version.
E or Erase - Package has been removed.
I or Install - New package has been installed.
O or Obsoleting - Package has been marked as obsolete.
R or Reinstall - Package has been reinstalled.
U or Update - Package has been updated to a newer version.
Altered — The number of packages that were affected by a yum, as follows:
*lt; - Before the transaction finished, the rpmdb database was changed outside yum.
> - After the transaction finished, the rpmdb database was changed outside yum.
* - The transaction failed to finish.
# - The transaction finished successfully, but yum returned a non-zero exit code.
E - The transaction finished successfully, but an error or a warning was displayed.
P - The transaction finished successfully, but problems already existed in the rpmdb database.
s - The transaction finished successfully, but the --skip-broken command line option was used and certain packages were skipped.