如何使用 yum history 检查哪些软件包已更新?

如何使用 yum history 检查哪些软件包已更新?

好的,让我们做一个小实验:在新安装的 CentOS 上,当我输入时yum history list,输出是:

[user@machine ~]# yum history list
Loaded plugins: security
ID | Login user               | Date and time    | Action(s)      |  Altered
 -------------------------------------------------------------------------------
 8 | root <root>              | 2017-03-02 09:42 | I, U           |   28   
 7 | root <root>              | 2017-03-02 09:41 | I, U           |    8   
 6 | root <root>              | 2016-01-30 10:48 | Update         |   10   
 5 | root <root>              | 2015-09-26 16:35 | Update         |    1  <
 4 | System <unset>           | 2015-07-14 21:28 | I, U           |   91 > 
 3 | System <unset>           | 2015-07-14 21:27 | Install        |    1   
 2 | System <unset>           | 2015-07-14 21:27 | Install        |    1   
 1 | System <unset>           | 2015-07-14 21:16 | Install        |  474   
 history list

现在让我们使用 更新 vim yum update vim -y,之后yum history list会产生以下内容:

 [user@machine ~]# yum history list
 Loaded plugins: security
 ID     | Login user               | Date and time    | Action(s)      | Altered
 ------------------------------------------------------------------------------- 
 9 | root <root>              | 2017-07-28 18:08 | I, U           |    3   
 8 | root <root>              | 2017-03-02 09:42 | I, U           |   28   
 7 | root <root>              | 2017-03-02 09:41 | I, U           |    8   
 6 | root <root>              | 2016-01-30 10:48 | Update         |   10   
 5 | root <root>              | 2015-09-26 16:35 | Update         |    1  <
 4 | System <unset>           | 2015-07-14 21:28 | I, U           |   91 > 
 3 | System <unset>           | 2015-07-14 21:27 | Install        |    1   
 2 | System <unset>           | 2015-07-14 21:27 | Install        |    1   
 1 | System <unset>           | 2015-07-14 21:16 | Install        |  474 

问题是,如果我有兴趣查看更新了哪个包,我该如何理解这个输出?

答案1

仅凭这个输出你无法真正理解它的含义。但如果你看看文档,您会发现它yum history info可以为您提供有关实际发生情况的更多信息。它接受 ID 作为参数。

相关内容