LoginSignup
3
3

More than 5 years have passed since last update.

yumで自分でインストールしたりアップデートしたパッケージを洗い出す

Posted at

サーバーの刷新作業をしていてそれまでにYumでどんなパッケージをインストールしたか正確に知りたくなったので調べました。

historyコマンドを使う

history list

$ sudo yum history list all
読み込んだプラグイン:priorities, update-motd, upgrade-helper
ID     | ログイン ユーザー        | 日時             | 操作           | 変更
-------------------------------------------------------------------------------
    66 |  <user0001>              | 2017-08-18 02:48 | Install        |    2
    65 | root <root>              | 2017-08-15 07:21 | Update         |    1 EE
    64 |  <user0001>              | 2017-08-01 03:50 | Install        |    2
    63 |  <user02>                | 2017-06-22 01:10 | E, I, U        |  111 EE
..... 省略 .....
     6 |  <user05>                | 2014-03-19 08:10 | Install        |    2
     5 |  <user05>                | 2014-03-19 08:10 | Install        |    1
     4 |  <user05>                | 2014-03-19 08:09 | Install        |    1
     3 |  <user05>                | 2014-03-19 08:09 | Install        |    4
     2 |  <user05>                | 2014-03-19 08:09 | Install        |   11
     1 | 222                      | 2014-03-19 07:01 | I, U           |   47 EE
history list

66回Yumで何かをしてることがわかる。

history info

history listで得た番号を指定するとそのトランザクションで何をしたかがわかる。

$ sudo yum history info 49
読み込んだプラグイン:priorities, update-motd, upgrade-helper
トランザクション ID : 49
開始時間            : Tue Sep 13 00:44:45 2016
開始 rpmdb          : 650:cb59xxxxxxxx
終了時間            :            00:44:46 2016 (1 秒)
終了 rpmdb          : 650:cb59xxxxxxxx
ユーザー            :  <user03>
終了コード          : 失敗しました: 1
コマンドライン      : -y localinstall hogehoge

範囲指定もできる

$ sudo yum history info 1..48

こうするとトランザクションID1〜48番で何をしたかがわかる。

Redhatのマニュアル

 https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Yum-Transaction_History.html

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3