![如何使用 yum history 检查哪些软件包已更新?](https://linux22.com/image/1536923/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20yum%20history%20%E6%A3%80%E6%9F%A5%E5%93%AA%E4%BA%9B%E8%BD%AF%E4%BB%B6%E5%8C%85%E5%B7%B2%E6%9B%B4%E6%96%B0%EF%BC%9F.png)
好的,让我们做一个小实验:在新安装的 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 作为参数。