Yum Historyyum history command is to fulfill the need of record and report what have been done in our system with its
installed software. The user can view with this command what happened with recent transactions.
[root@pc ashu]# yum history
'ID | Login user
| Date and time | Action(s)
| Altered
----------------------------------------------------------------------------------------------------------79 | Ashutosh Maurya | 2014-10-03 15:36 | I, U
| 35
78 | Ashutosh Maurya | 2014-09-17 10:42 | Install
| 1
77 | Ashutosh Maurya | 2014-09-15 09:22 | Reinstall | 3
76 | Ashutosh Maurya | 2014-09-13 14:38 | Install
| 1
75 | Ashutosh Maurya | 2014-09-13 14:34 | Install
| 4
74 | Ashutosh Maurya | 2014-09-13 14:27 | Install
| 59
73 | Ashutosh Maurya | 2014-09-12 10:08 | Install
| 6
72 | Ashutosh Maurya | 2014-09-06 16:44 | Install
| 3
71 | Ashutosh Maurya | 2014-09-05 15:03 | Update
| 10
70 | Ashutosh Maurya | 2014-09-02 08:55 | I, U
| 11
69 | Ashutosh Maurya | 2014-08-30 12:36 | Install
| 1
68 | Ashutosh Maurya | 2014-08-28 10:52 | Install
| 2
67 | Ashutosh Maurya | 2014-08-26 15:08 | Install
| 4
66 | Ashutosh Maurya | 2014-08-26 12:51 | Install
| 8 EE
65 | Ashutosh Maurya | 2014-08-26 12:50 | Install
| 1 EE
64 | Ashutosh Maurya | 2014-08-26 11:52 | Install
| 2
63 | Ashutosh Maurya | 2014-08-26 11:30 | I, U
| 83
62 | root
| 2014-08-07 16:23 | Install
| 2
61 | root
| 2014-06-26 10:34 | Install
| 20
60 | root
| 2014-06-14 10:34 | Install
| 8>
history list
[root@pc ashu]#
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.
For more information use the transaction ID:[root@pc ashu]# yum history info 77
Transaction ID : 77
Begin time : Mon Sep 15 09:22:51 2014
Begin rpmdb : 1488:
ba95c4d535fb3d351b0857098c14e7820a316bfb
End time
:
09:22:57 2014 (6 seconds)
End rpmdb
: 1488:ba95c4d535fb3d351b0857098c14e7820a316bfb
User
: Ashutosh Maurya
Return-Code : Success
Command Line : reinstall ssh*
Transaction performed with:
Installed rpm-4.8.0-37.el6.i686
@base
Installed yum-3.2.29-43.el6.centos.noarch
@updates
Installed yum-metadata-parser-1.1.2-16.el6.i686 @anaconda-CentOS-201303020136.i386/6.4
Packages Altered:
Reinstall ssh-installkeys-1.8-2.el6.noarch
@epel
Reinstall sshpass-1.05-1.el6.rf.i686
@rpmforge
Reinstall sshuttle-0-7.20120810git9ce2fa0.el6.noarch @epel
history info
[root@pc ashu]#
List summary of all all past transactions:[root@pc ashu]# yum history summary 70..75
Find out history of a package called httpd:[root@pc ashu]# yum history list httpd
ID | Login user
| Date and time | Action(s)
| Altered
-------------------------------------------------------------------------------------------------------63 | Ashutosh Maurya | 2014-08-26 11:30 | I, U
| 83
3 | Ashutosh Maurya | 2014-05-21 16:46 | I, O, U
| 296 EE
1 | System
| 2014-05-21 15:36 | Install
| 1003
history list
How do I undo / revert transactions ?
[root@pc ashu]# yum history package-list httpd
ID | Action(s)
| Package
------------------------------------------------------------------------------------------------------80 | Erase
| httpd-2.2.15-31.el6.centos.i686
EE
63 | Updated
| httpd-2.2.15-30.el6.centos.i686