检查升级前和升级后安装的打包包

检查升级前和升级后安装的打包包

是否有任何软件可以让我查看更新/升级之前和之后安装了哪些软件包?像已安装软件包的“snspshot”之类的东西来检查它们是否已更新?

答案1

您可以使用yum history

例如(在有时会进行一些升级的 CentOS 容器上):

[root@centos7-amd64bis ~]# yum history
Loaded plugins: fastestmirror
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    33 | install sudo             | 2018-09-24 22:06 | Install        |    1   
    32 | install selinux-policy   | 2018-09-14 21:28 | Install        |    1   
    31 | install iptables-service | 2018-08-20 18:33 | Install        |    1   
    30 | install conntrack-tools  | 2018-08-20 18:32 | Install        |    4   
    29 | install mariadb-server   | 2018-08-11 10:24 | Install        |   12   
    28 | install psacct           | 2018-07-28 15:22 | Install        |    2   
    27 | install socat            | 2018-07-26 22:21 | Install        |    1   
    26 | upgrade                  | 2018-07-14 20:34 | I, U           |  116 EE
    25 | -y install strace        | 2018-05-14 20:43 | Install        |    1   
    24 | install lsof             | 2018-05-14 20:15 | Install        |    1   
    23 | install nc               | 2018-04-14 07:33 | Install        |    1   
    22 | install xfsprogs         | 2018-04-11 22:27 | Install        |    1   
    21 | install lxc-templates    | 2018-04-10 17:12 | Install        |    1   
    20 | install lxc              | 2018-04-10 17:11 | Install        |    7   
    19 | install nftables         | 2018-04-06 19:34 | Install        |    3   
    18 | install centos-release-s | 2018-03-23 20:01 | Install        |    1   
    17 | upgrade                  | 2018-03-21 20:56 | Update         |   18   
    16 | install tcpdump          | 2018-03-01 20:45 | Install        |    2   
    15 | upgrade                  | 2018-01-23 18:44 | Update         |    3   
    14 | install rh-php56-php     | 2017-12-10 11:08 | Install        |    5   
history list
[root@centos7-amd64bis ~]# yum history info 26
Loaded plugins: fastestmirror

[...]

Transaction performed with:
    Updated       rpm-4.11.3-25.el7.x86_64                      @base
    Updated       yum-3.4.3-154.el7.centos.1.noarch             @updates
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64       @base
    Updated       yum-plugin-fastestmirror-1.1.31-42.el7.noarch @base
Packages Altered:

[...]

    Updated     acl-2.2.51-12.el7.x86_64                       ?
    Update          2.2.51-14.el7.x86_64                       @base
    Updated     audit-libs-2.7.6-3.el7.x86_64                  @base
    Update                 2.8.1-3.el7.x86_64                  @base
    Updated     audit-libs-python-2.7.6-3.el7.x86_64           @base
    Update                        2.8.1-3.el7.x86_64           @base
    Updated     bash-4.2.46-29.el7_4.x86_64                    @updates
    Update           4.2.46-30.el7.x86_64                      @base
    Updated     bind-libs-lite-32:9.9.4-51.el7_4.2.x86_64      @updates
    Update                     32:9.9.4-61.el7.x86_64          @base
    Updated     bind-license-32:9.9.4-51.el7_4.2.noarch        @updates
    Update                   32:9.9.4-61.el7.noarch            @base

[...]

相关内容