過去に実施したyumの履歴を確認する

yumによるパッケージ操作は、yumで過去に実施した操作の履歴も確認する事が出来ます。

※目次をクリックすると目次の下部にコンテンツが表示されます。

実施時期などを基に過去の履歴を調べる
1)過去にyumで実施した全作業のリストを表示する
 
“yum history list all”で表示できます。
例)

# yum history list all

ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    33 |  <rails>                 | 2013-03-05 17:55 | Install        |    2
    32 |  <rails>                 | 2013-03-05 17:55 | I, U           |    3
    31 |  <rails>                 | 2013-02-27 17:32 | Install        |    1
    :

上記のように実施日時、ユーザー名、アクション(インストール、更新、削除など)が表示されます。
 
2)詳細な履歴を確認する
 
1)ではどのパッケージに対して実施したかが分かりません。詳細な履歴を確認するには、1)で表示された”ID”(トランザクションID)を指定して以下のコマンドを実行します。
“yum history info トランザクションID”
例)

# yum history info 30

Transaction ID : 30
Begin time     : Wed Feb 20 16:03:05 2013
Begin rpmdb    : 334:80539480d2e600a305aed29cc7534715b405ba0f
End time       :            16:03:12 2013 (7 seconds)
End rpmdb      : 335:fa210d00357e8dabb366d15d4dba37653d52ae9f
User           :  <rails>
Return-Code    : Success
Command Line   : install mysql-devel
Transaction performed with:
    Installed     rpm-4.8.0-19.el6.x86_64                       @anaconda-CentOS-201112091719.x86_64/6.2
    Installed     yum-3.2.29-22.el6.centos.noarch               @anaconda-CentOS-201112091719.x86_64/6.2
    Installed     yum-plugin-fastestmirror-1.1.30-10.el6.noarch @anaconda-CentOS-201112091719.x86_64/6.2
Packages Altered:
    Updated mysql-5.1.66-2.el6_3.x86_64        @updates
    Update        5.1.67-1.el6_3.x86_64        @updates
    Install mysql-devel-5.1.67-1.el6_3.x86_64  @updates
    Updated mysql-libs-5.1.66-2.el6_3.x86_64   @updates
    Update             5.1.67-1.el6_3.x86_64   @updates
    Updated mysql-server-5.1.66-2.el6_3.x86_64 @updates
    Update               5.1.67-1.el6_3.x86_64 @updates
history info

すでにインストール済みのパッケージのリストを表示
下記コマンドで調べる事ができます。
yum history list パッケージ名
yum history packages-list パッケージ名
yum history info パッケージ名
yum history packages-info パッケージ名
※パッケージ名には、ワイルドカードを指定して関連するパッケージをまとめて調べる事も出来ます。
 
1)簡単なリストを表示
 
①yum history list
 

# yum history list net-snmp*

ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    25 |  <wordpress>             | 2013-02-01 13:46 | Install        |    1
    23 |  <wordpress>             | 2013-01-27 21:28 | Install        |    3
history list

 
②yum history packages-list
 

# yum history packages-list net-snmp*

ID     | Action(s)      | Package
-------------------------------------------------------------------------------
    25 | Install        | net-snmp-utils-1:5.5-41.el6_3.1.x86_64
    23 | Install        | net-snmp-1:5.5-41.el6_3.1.x86_64
    23 | Dep-Install    | net-snmp-libs-1:5.5-41.el6_3.1.x86_64
history packages-list

 
2)詳細な情報を表示
 
①yum history info
 

# yum history info net-snmp*

Transaction ID : 25
Begin time     : Fri Feb  1 13:46:25 2013
Begin rpmdb    : 312:4a5b5e2aa45f4fd6d6619200e2c735f62cdae682
End time       :                          (0 seconds)
End rpmdb      : 313:06375c87590a0bf95ddfbeb12cffe78c35d25337
User           :  <wordpress>
Return-Code    : Success
Command Line   : install net-snmp-utils
Transaction performed with:
    Installed     rpm-4.8.0-19.el6.x86_64                       @anaconda-CentOS-201112091719.x86_64/6.2
    Installed     yum-3.2.29-22.el6.centos.noarch               @anaconda-CentOS-201112091719.x86_64/6.2
    Installed     yum-plugin-fastestmirror-1.1.30-10.el6.noarch @anaconda-CentOS-201112091719.x86_64/6.2
Packages Altered:
    Install net-snmp-utils-1:5.5-41.el6_3.1.x86_64 @updates
-------------------------------------------------------------------------------
Transaction ID : 23
Begin time     : Sun Jan 27 21:28:01 2013
  :

 
②yum history packages-info
 

# yum history packages-info net-snmp*

Transaction ID : 25
Begin time     : Fri Feb  1 13:46:25 2013
Package        : net-snmp-utils-1:5.5-41.el6_3.1.x86_64
State          : Install
Size           : 370,527
Build host     : c6b10.bsys.dev.centos.org
Build time     : Mon Jul 23 15:10:54 2012
Packager       : CentOS BuildSystem <http://bugs.centos.org>
Vendor         : CentOS
License        : BSD
URL            : http://net-snmp.sourceforge.net/
Source RPM     : net-snmp-5.5-41.el6_3.1.src.rpm
Commit Time    : Wed Jun 27 21:00:00 2012
Committer      : Jan Safranek <jsafrane@redhat.com>
Reason         : user
Command Line   : install net-snmp-utils
From repo      : updates
Installed by   :  <wordpress>

Transaction ID : 23
Begin time     : Sun Jan 27 21:28:01 2013
Package        : net-snmp-1:5.5-41.el6_3.1.x86_64
State          : Install
  :
  :
Transaction ID : 23
Begin time     : Sun Jan 27 21:28:01 2013
Package        : net-snmp-libs-1:5.5-41.el6_3.1.x86_64
  :
  :

関連記事の目次

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください