Home > Fedora, Linux > yum history

yum history

yum in Fedora 12 Beta contain a new cool history feature that make it posible to
see what happed in part transaction and redo/undo past transaction.

Example 1: Showing the past transaction


# yum history
Loaded plugins: presto, refresh-packagekit
ID     | Login user             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    17 | Tim Lauridsen     | 2009-10-26 15:43 | Erase          |    1
    16 | Tim Lauridsen     | 2009-10-26 15:30 | Install        |    1
    15 | Tim Lauridsen     | 2009-10-26 15:27 | Install        |    3
    14 | Tim Lauridsen     | 2009-10-26 15:25 | Erase          |    1
    13 | Tim Lauridsen     | 2009-10-26 15:09 | Install        |    1
    12 | Tim Lauridsen     | 2009-10-26 13:17 | Install        |    6
    11 | Tim Lauridsen     | 2009-10-26 13:13 | I, U           |   28
    10 | Tim Lauridsen     | 2009-10-24 18:50 | Install        |  122
     9 | Tim Lauridsen     | 2009-10-24 18:40 | Update         |   11
     8 | Tim Lauridsen     | 2009-10-23 19:39 | Install        |    2
     7 | Tim Lauridsen     | 2009-10-23 19:30 | Install        |   26
     6 | Tim Lauridsen     | 2009-10-23 18:51 | Install        |    1  <
     5 | Tim Lauridsen     | 2009-10-23 18:49 | Install        |   42 ><
     4 | Tim Lauridsen     | 2009-10-23 18:46 | Install        |    5 >
     3 | Tim Lauridsen     | 2009-10-23 18:34 | I, U           |  189
     2 | Tim Lauridsen     | 2009-10-23 18:14 | Install        |    3
     1 | System          | 2009-10-23 16:35 | Install        | 1136

Example 2: Showing transaction containing the yumex package

# yum history list yumex
Loaded plugins: presto, refresh-packagekit
ID     | Login user             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     2 | Tim Lauridsen     | 2009-10-23 18:14 | Install        |    3

Example 3: Show details about a transaction id.

# yum history info 2
Loaded plugins: presto, refresh-packagekit
Transaction ID : 2
Begin time     : Fri Oct 23 18:14:05 2009
Begin rpmdb    : 1136:908205640b70e31c5b163c091392b42ba71352d5
End time       :            18:14:11 2009 (6 seconds)
End rpmdb      : 1139:711687a3c9f18d3899a1dc5a6285cc4bed4cc037
User           : Tim Lauridsen 
Return-Code    : Success
Transaction performed with:
    Installed    rpm-4.7.1-6.fc12.i686
    Updated      yum-3.2.24-9.fc12.noarch
    Installed    yum-metadata-parser-1.1.2-14.fc12.i686
Packages Altered:
    Install      pexpect-2.3-4.fc12.noarch
    Install      python-enum-0.4.3-6.fc12.noarch
    Install      yumex-2.9.3-1.fc12.noarch

Example 4: Redo a transaction

# yum history info 16
Loaded plugins: presto, refresh-packagekit
Transaction ID : 16
Begin time     : Mon Oct 26 15:30:03 2009
Begin rpmdb    : 1355:1bc4615c42e3a0e781915a708df4880b262d60b5
End time       :            15:30:06 2009 (3 seconds)
End rpmdb      : 1356:d21998bce69db64bb12a14c3abe84e182fd4a19b
User           : Tim Lauridsen 
Return-Code    : Success
Transaction performed with:
    Installed    rpm-4.7.1-6.fc12.i686
    Installed    yum-3.2.25-1.fc12.noarch
    Installed    yum-metadata-parser-1.1.2-14.fc12.i686
    Installed    yumex-2.9.3-1.fc12.noarch
Packages Altered:
    Install      0xFFFF-0.3.9-4.fc12.i686

# yum history redo 16
Loaded plugins: presto, refresh-packagekit
Repeating transaction 16, from Mon Oct 26 15:30:03 2009
    Install      0xFFFF-0.3.9-4.fc12.i686
Resolving Dependencies
--> Running transaction check
---> Package 0xFFFF.i686 0:0.3.9-4.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch           Version                Repository         Size
================================================================================
Installing:
 0xFFFF           i686           0.3.9-4.fc12           rawhide            40 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 40 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 40 k
0xFFFF-0.3.9-4.fc12.i686.rpm                             |  40 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 0xFFFF-0.3.9-4.fc12.i686                                 1/1 

Installed:
  0xFFFF.i686 0:0.3.9-4.fc12                                                    

Complete!

Example 5: Undo a transaction

# yum history undo 16
Loaded plugins: presto, refresh-packagekit
Undoing transaction 16, from Mon Oct 26 15:30:03 2009
    Install      0xFFFF-0.3.9-4.fc12.i686
Resolving Dependencies
--> Running transaction check
---> Package 0xFFFF.i686 0:0.3.9-4.fc12 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch          Version                 Repository          Size
================================================================================
Removing:
 0xFFFF          i686          0.3.9-4.fc12            installed          100 k

Transaction Summary
================================================================================
Remove        1 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : 0xFFFF-0.3.9-4.fc12.i686                                 1/1 

Removed:
  0xFFFF.i686 0:0.3.9-4.fc12                                                    

Complete!
Categories: Fedora, Linux Tags: ,
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.