zoukankan      html  css  js  c++  java
  • yum history使用详解(某次为解决误卸载软件的回退实验)

     推荐学习链接: yum命令详解

    [root@localhost ~]# yum history list  #查看历史
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
         9 | remove libXt-1.1.5-3.el7 | 2021-10-14 09:16 | Erase          |    9   
         8 | localinstall google-chro | 2021-10-14 01:58 | Install        |    9 EE
         7 | install lrzsz            | 2021-10-14 01:57 | Install        |    1   
         6 | install dbus-x11         | 2021-10-14 01:51 | Install        |    3   
         5 | install xterm            | 2021-10-14 01:15 | Install        |    3   
         4 | install -y xorg-x11-xaut | 2021-10-14 01:12 | Install        |   26   
         3 | install -y firefox.x86_6 | 2021-10-14 01:08 | I, U           |   88   
    history list
    [root@localhost ~]# rpm -qa|grep chrome  #现在有谷歌浏览器
    google-chrome-stable-88.0.4324.150-1.x86_64
    [root@localhost ~]# rpm -qa|grep gtk3
    gtk3-3.22.30-6.el7.x86_64
    [root@localhost ~]# yum remove gtk3 #卸载gtk3
    Loaded plugins: fastestmirror
    Resolving Dependencies
    --> Running transaction check
    ---> Package gtk3.x86_64 0:3.22.30-6.el7 will be erased
    --> Processing Dependency: libgdk-3.so.0()(64bit) for package: google-chrome-stable-88.0.4324.150-1.x86_64
    --> Processing Dependency: libgtk-3.so.0()(64bit) for package: google-chrome-stable-88.0.4324.150-1.x86_64
    --> Running transaction check
    ---> Package google-chrome-stable.x86_64 0:88.0.4324.150-1 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                        Arch                             Version                                   Repository                           Size
    =====================================================================================================================================================================
    Removing:
     gtk3                                           x86_64                           3.22.30-6.el7                             @updates                             17 M
    Removing for dependencies:
     google-chrome-stable                           x86_64                           88.0.4324.150-1                           installed                           228 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Remove  1 Package (+1 Dependent package)
    
    Installed size: 245 M
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       1/2 
      Erasing    : gtk3-3.22.30-6.el7.x86_64                                                                                                                         2/2 
      Verifying  : gtk3-3.22.30-6.el7.x86_64                                                                                                                         1/2 
      Verifying  : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       2/2 
    
    Removed:
      gtk3.x86_64 0:3.22.30-6.el7                                                                                                                                        
    
    Dependency Removed:
      google-chrome-stable.x86_64 0:88.0.4324.150-1                                                                                                                      
    
    Complete!
    [root@localhost ~]# rpm -qa|grep chrome  #谷歌浏览器也被卸载掉
    [root@localhost ~]# yum history list #刚刚刚的操作是第23步骤
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
         9 | remove libXt-1.1.5-3.el7 | 2021-10-14 09:16 | Erase          |    9   
         8 | localinstall google-chro | 2021-10-14 01:58 | Install        |    9 EE
         7 | install lrzsz            | 2021-10-14 01:57 | Install        |    1   
         6 | install dbus-x11         | 2021-10-14 01:51 | Install        |    3   
         5 | install xterm            | 2021-10-14 01:15 | Install        |    3   
         4 | install -y xorg-x11-xaut | 2021-10-14 01:12 | Install        |   26   
    history list
    [root@localhost ~]# yum history info 23  #查看id是23的做了什么
    Loaded plugins: fastestmirror
    Transaction ID : 23
    Begin time     : Mon Nov  1 15:42:47 2021
    Begin rpmdb    : 633:834d8b2f5ee9363546b8bcfe2be599d21cfa5dd0
    End time       :            15:42:49 2021 (2 seconds)
    End rpmdb      : 631:cbbc083a4dc3433acac160db9a0672d0e853410d
    User           : root <root>
    Return-Code    : Success
    Command Line   : remove gtk3
    Transaction performed with:
        Installed     rpm-4.11.3-25.el7.x86_64                      @anaconda
        Installed     yum-3.4.3-154.el7.centos.noarch               @anaconda
        Installed     yum-plugin-fastestmirror-1.1.31-42.el7.noarch @anaconda
    Packages Altered:
        Erase google-chrome-stable-88.0.4324.150-1.x86_64 @/google-chrome-stable_current_x86_64
        Erase gtk3-3.22.30-6.el7.x86_64                   @updates
    history info
    [root@localhost ~]# yum history undo 23  #撤销23步骤
    Loaded plugins: fastestmirror
    Undoing transaction 23, from Mon Nov  1 15:42:47 2021
        Erase google-chrome-stable-88.0.4324.150-1.x86_64 @/google-chrome-stable_current_x86_64
        Erase gtk3-3.22.30-6.el7.x86_64                   @updates
    base                                                                                                                                          | 3.6 kB  00:00:00     
    epel                                                                                                                                          | 4.7 kB  00:00:00     
    extras                                                                                                                                        | 2.9 kB  00:00:00     
    google-chrome                                                                                                                                 | 1.3 kB  00:00:00     
    updates                                                                                                                                       | 2.9 kB  00:00:00     
    (1/2): epel/x86_64/updateinfo                                                                                                                 | 1.0 MB  00:00:01     
    (2/2): epel/x86_64/primary_db                                                                                                                 | 7.0 MB  00:00:03     
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Error: No package(s) available to install
    [root@localhost ~]# rpm -qa|grep chrome  #谷歌并没有重新安装,gtk3页没有重新安装,记录没有 增加
    [root@localhost ~]# yum history list
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
         9 | remove libXt-1.1.5-3.el7 | 2021-10-14 09:16 | Erase          |    9   
         8 | localinstall google-chro | 2021-10-14 01:58 | Install        |    9 EE
         7 | install lrzsz            | 2021-10-14 01:57 | Install        |    1   
         6 | install dbus-x11         | 2021-10-14 01:51 | Install        |    3   
         5 | install xterm            | 2021-10-14 01:15 | Install        |    3   
         4 | install -y xorg-x11-xaut | 2021-10-14 01:12 | Install        |   26   
    history list
    
    
    
    
    没有装依赖的记录undo
    [root@localhost ~]# yum history list #查看历史记录
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
         9 | remove libXt-1.1.5-3.el7 | 2021-10-14 09:16 | Erase          |    9   
         8 | localinstall google-chro | 2021-10-14 01:58 | Install        |    9 EE
         7 | install lrzsz            | 2021-10-14 01:57 | Install        |    1   
         6 | install dbus-x11         | 2021-10-14 01:51 | Install        |    3   
         5 | install xterm            | 2021-10-14 01:15 | Install        |    3   
    history list
    [root@localhost ~]# rpm -qa|grep htop  
    [root@localhost ~]# yum install -y htop #安装htop
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package htop.x86_64 0:2.2.0-3.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                              Arch                                   Version                                      Repository                            Size
    =====================================================================================================================================================================
    Installing:
     htop                                 x86_64                                 2.2.0-3.el7                                  epel                                 103 k
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package
    
    Total download size: 103 k
    Installed size: 218 k
    Downloading packages:
    htop-2.2.0-3.el7.x86_64.rpm                                                                                                                   | 103 kB  00:00:00     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : htop-2.2.0-3.el7.x86_64                                                                                                                           1/1 
      Verifying  : htop-2.2.0-3.el7.x86_64                                                                                                                           1/1 
    
    Installed:
      htop.x86_64 0:2.2.0-3.el7                                                                                                                                          
    
    Complete!
    [root@localhost ~]# yum history list  #查看htop安装记录25
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
         9 | remove libXt-1.1.5-3.el7 | 2021-10-14 09:16 | Erase          |    9   
         8 | localinstall google-chro | 2021-10-14 01:58 | Install        |    9 EE
         7 | install lrzsz            | 2021-10-14 01:57 | Install        |    1   
         6 | install dbus-x11         | 2021-10-14 01:51 | Install        |    3   
    history list
    [root@localhost ~]# yum history redo 25  #撤销最近的记录25,卸载掉了
    Loaded plugins: fastestmirror
    Repeating transaction 25, from Mon Nov  1 15:52:48 2021
        Install htop-2.2.0-3.el7.x86_64 @epel
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Package htop-2.2.0-3.el7.x86_64 already installed and latest version
    history redo
    [root@localhost ~]# yum history undo 25
    Loaded plugins: fastestmirror
    Undoing transaction 25, from Mon Nov  1 15:52:48 2021
        Install htop-2.2.0-3.el7.x86_64 @epel
    Resolving Dependencies
    --> Running transaction check
    ---> Package htop.x86_64 0:2.2.0-3.el7 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                              Arch                                   Version                                     Repository                             Size
    =====================================================================================================================================================================
    Removing:
     htop                                 x86_64                                 2.2.0-3.el7                                 @epel                                 218 k
    
    Transaction Summary
    =====================================================================================================================================================================
    Remove  1 Package
    
    Installed size: 218 k
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : htop-2.2.0-3.el7.x86_64                                                                                                                           1/1 
      Verifying  : htop-2.2.0-3.el7.x86_64                                                                                                                           1/1 
    
    Removed:
      htop.x86_64 0:2.2.0-3.el7                                                                                                                                          
    
    Complete!
    [root@localhost ~]# rpm -qa|grep htop #htop已安装的被卸载掉
    
    
    
    有依赖的记录undo redo
    [root@localhost ~]# yum install -y nginx  #安装Nginx
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package nginx.x86_64 1:1.20.1-9.el7 will be installed
    --> Processing Dependency: nginx-filesystem = 1:1.20.1-9.el7 for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_1)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: nginx-filesystem for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libcrypto.so.1.1()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libprofiler.so.0()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Running transaction check
    ---> Package gperftools-libs.x86_64 0:2.6.1-1.el7 will be installed
    ---> Package nginx-filesystem.noarch 1:1.20.1-9.el7 will be installed
    ---> Package openssl11-libs.x86_64 1:1.1.1g-3.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                      Arch                               Version                                      Repository                        Size
    =====================================================================================================================================================================
    Installing:
     nginx                                        x86_64                             1:1.20.1-9.el7                               epel                             587 k
    Installing for dependencies:
     gperftools-libs                              x86_64                             2.6.1-1.el7                                  base                             272 k
     nginx-filesystem                             noarch                             1:1.20.1-9.el7                               epel                              24 k
     openssl11-libs                               x86_64                             1:1.1.1g-3.el7                               epel                             1.5 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package (+3 Dependent packages)
    
    Total download size: 2.3 M
    Installed size: 6.6 M
    Downloading packages:
    (1/4): nginx-filesystem-1.20.1-9.el7.noarch.rpm                                                                                               |  24 kB  00:00:00     
    (2/4): nginx-1.20.1-9.el7.x86_64.rpm                                                                                                          | 587 kB  00:00:00     
    (3/4): openssl11-libs-1.1.1g-3.el7.x86_64.rpm                                                                                                 | 1.5 MB  00:00:01     
    (4/4): gperftools-libs-2.6.1-1.el7.x86_64.rpm                                                                                                 | 272 kB  00:00:01     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                1.2 MB/s | 2.3 MB  00:00:01     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                1/4 
      Installing : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Installing : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              3/4 
      Installing : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       4/4 
      Verifying  : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              1/4 
      Verifying  : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Verifying  : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                3/4 
      Verifying  : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       4/4 
    
    Installed:
      nginx.x86_64 1:1.20.1-9.el7                                                                                                                                        
    
    Dependency Installed:
      gperftools-libs.x86_64 0:2.6.1-1.el7                  nginx-filesystem.noarch 1:1.20.1-9.el7                  openssl11-libs.x86_64 1:1.1.1g-3.el7                 
    
    Complete!
    [root@localhost ~]# yum history list  #查看安装Nginx的记录29
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        29 | install -y nginx         | 2021-11-01 15:56 | Install        |    4   
        28 | remove sshpass           | 2021-11-01 15:56 | Erase          |    1   
        27 | install -y sshpass       | 2021-11-01 15:55 | Install        |    1   
        26 | history undo 25          | 2021-11-01 15:53 | Erase          |    1   
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
        10 | install -y libXt-1.1.5-3 | 2021-10-14 10:28 | Install        |    1   
    history list
    [root@localhost ~]# yum history info 29  #查看安装记录29的详情
    Loaded plugins: fastestmirror
    Transaction ID : 29
    Begin time     : Mon Nov  1 15:56:35 2021
    Begin rpmdb    : 632:1152b582868dbe797121c53b42f3c3633f543996
    End time       :            15:56:38 2021 (3 seconds)
    End rpmdb      : 636:48baec6108d4c5a5c89192d63535fa615ab61422
    User           : root <root>
    Return-Code    : Success
    Command Line   : install -y nginx
    Transaction performed with:
        Installed     rpm-4.11.3-25.el7.x86_64                      @anaconda
        Installed     yum-3.4.3-154.el7.centos.noarch               @anaconda
        Installed     yum-metadata-parser-1.1.4-10.el7.x86_64       @anaconda
        Installed     yum-plugin-fastestmirror-1.1.31-42.el7.noarch @anaconda
    Packages Altered:
        Dep-Install gperftools-libs-2.6.1-1.el7.x86_64     @base
        Install     nginx-1:1.20.1-9.el7.x86_64            @epel
        Dep-Install nginx-filesystem-1:1.20.1-9.el7.noarch @epel
        Dep-Install openssl11-libs-1:1.1.1g-3.el7.x86_64   @epel
    history info
    [root@localhost ~]# rpm -qa|grep nginx  #查看已经被安装了Nginx
    nginx-filesystem-1.20.1-9.el7.noarch
    nginx-1.20.1-9.el7.x86_64
    [root@localhost ~]# yum history undo 29 #撤销安装记录29
    Loaded plugins: fastestmirror
    Undoing transaction 29, from Mon Nov  1 15:56:35 2021
        Dep-Install gperftools-libs-2.6.1-1.el7.x86_64     @base
        Install     nginx-1:1.20.1-9.el7.x86_64            @epel
        Dep-Install nginx-filesystem-1:1.20.1-9.el7.noarch @epel
        Dep-Install openssl11-libs-1:1.1.1g-3.el7.x86_64   @epel
    Resolving Dependencies
    --> Running transaction check
    ---> Package gperftools-libs.x86_64 0:2.6.1-1.el7 will be erased
    ---> Package nginx.x86_64 1:1.20.1-9.el7 will be erased
    ---> Package nginx-filesystem.noarch 1:1.20.1-9.el7 will be erased
    ---> Package openssl11-libs.x86_64 1:1.1.1g-3.el7 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                      Arch                               Version                                     Repository                         Size
    =====================================================================================================================================================================
    Removing:
     gperftools-libs                              x86_64                             2.6.1-1.el7                                 @base                             1.3 M
     nginx                                        x86_64                             1:1.20.1-9.el7                              @epel                             1.7 M
     nginx-filesystem                             noarch                             1:1.20.1-9.el7                              @epel                             0.0  
     openssl11-libs                               x86_64                             1:1.1.1g-3.el7                              @epel                             3.6 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Remove  4 Packages
    
    Installed size: 6.6 M
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       1/4 
      Erasing    : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Erasing    : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              3/4 
      Erasing    : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                4/4 
      Verifying  : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              1/4 
      Verifying  : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Verifying  : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                3/4 
      Verifying  : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       4/4 
    
    Removed:
      gperftools-libs.x86_64 0:2.6.1-1.el7      nginx.x86_64 1:1.20.1-9.el7      nginx-filesystem.noarch 1:1.20.1-9.el7      openssl11-libs.x86_64 1:1.1.1g-3.el7     
    
    Complete!
    [root@localhost ~]# yum history list  #查看撤销记录30
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        30 | history undo 29          | 2021-11-01 15:58 | Erase          |    4   
        29 | install -y nginx         | 2021-11-01 15:56 | Install        |    4   
        28 | remove sshpass           | 2021-11-01 15:56 | Erase          |    1   
        27 | install -y sshpass       | 2021-11-01 15:55 | Install        |    1   
        26 | history undo 25          | 2021-11-01 15:53 | Erase          |    1   
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
        12 | install -y dbus-x11.x86_ | 2021-10-14 10:36 | Install        |    1   
        11 | install -y xorg-x11-serv | 2021-10-14 10:32 | Install        |    4   
    history list
    [root@localhost ~]# yum history info 30   #查看撤销记录详情 30
    Loaded plugins: fastestmirror
    Transaction ID : 30
    Begin time     : Mon Nov  1 15:58:35 2021
    Begin rpmdb    : 636:48baec6108d4c5a5c89192d63535fa615ab61422
    End time       :                          (0 seconds)
    End rpmdb      : 632:1152b582868dbe797121c53b42f3c3633f543996
    User           : root <root>
    Return-Code    : Success
    Command Line   : history undo 29
    Transaction performed with:
        Installed     rpm-4.11.3-25.el7.x86_64                      @anaconda
        Installed     yum-3.4.3-154.el7.centos.noarch               @anaconda
        Installed     yum-plugin-fastestmirror-1.1.31-42.el7.noarch @anaconda
    Packages Altered:
        Erase gperftools-libs-2.6.1-1.el7.x86_64     @base
        Erase nginx-1:1.20.1-9.el7.x86_64            @epel
        Erase nginx-filesystem-1:1.20.1-9.el7.noarch @epel
        Erase openssl11-libs-1:1.1.1g-3.el7.x86_64   @epel
    history info
    [root@localhost ~]# rpm -qa|grep nginx  #Nginx被卸载掉了,被安装的依赖也 卸载掉了
    [root@localhost ~]# yum history redo 29  #重做第29个安装Nginx的记录
    Loaded plugins: fastestmirror
    Repeating transaction 29, from Mon Nov  1 15:56:35 2021
        Dep-Install gperftools-libs-2.6.1-1.el7.x86_64     @base
        Install     nginx-1:1.20.1-9.el7.x86_64            @epel
        Dep-Install nginx-filesystem-1:1.20.1-9.el7.noarch @epel
        Dep-Install openssl11-libs-1:1.1.1g-3.el7.x86_64   @epel
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package nginx.x86_64 1:1.20.1-9.el7 will be installed
    --> Processing Dependency: nginx-filesystem = 1:1.20.1-9.el7 for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_1)(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: nginx-filesystem for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libcrypto.so.1.1()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libprofiler.so.0()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Processing Dependency: libssl.so.1.1()(64bit) for package: 1:nginx-1.20.1-9.el7.x86_64
    --> Running transaction check
    ---> Package gperftools-libs.x86_64 0:2.6.1-1.el7 will be installed
    ---> Package nginx-filesystem.noarch 1:1.20.1-9.el7 will be installed
    ---> Package openssl11-libs.x86_64 1:1.1.1g-3.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                      Arch                               Version                                      Repository                        Size
    =====================================================================================================================================================================
    Installing:
     nginx                                        x86_64                             1:1.20.1-9.el7                               epel                             587 k
    Installing for dependencies:
     gperftools-libs                              x86_64                             2.6.1-1.el7                                  base                             272 k
     nginx-filesystem                             noarch                             1:1.20.1-9.el7                               epel                              24 k
     openssl11-libs                               x86_64                             1:1.1.1g-3.el7                               epel                             1.5 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package (+3 Dependent packages)
    
    Total download size: 2.3 M
    Installed size: 6.6 M
    Is this ok [y/d/N]: y
    Downloading packages:
    (1/4): gperftools-libs-2.6.1-1.el7.x86_64.rpm                                                                                                 | 272 kB  00:00:00     
    (2/4): nginx-filesystem-1.20.1-9.el7.noarch.rpm                                                                                               |  24 kB  00:00:00     
    (3/4): nginx-1.20.1-9.el7.x86_64.rpm                                                                                                          | 587 kB  00:00:00     
    (4/4): openssl11-libs-1.1.1g-3.el7.x86_64.rpm                                                                                                 | 1.5 MB  00:00:01     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                1.7 MB/s | 2.3 MB  00:00:01     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                1/4 
      Installing : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Installing : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              3/4 
      Installing : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       4/4 
      Verifying  : 1:openssl11-libs-1.1.1g-3.el7.x86_64                                                                                                              1/4 
      Verifying  : 1:nginx-filesystem-1.20.1-9.el7.noarch                                                                                                            2/4 
      Verifying  : gperftools-libs-2.6.1-1.el7.x86_64                                                                                                                3/4 
      Verifying  : 1:nginx-1.20.1-9.el7.x86_64                                                                                                                       4/4 
    
    Installed:
      nginx.x86_64 1:1.20.1-9.el7                                                                                                                                        
    
    Dependency Installed:
      gperftools-libs.x86_64 0:2.6.1-1.el7                  nginx-filesystem.noarch 1:1.20.1-9.el7                  openssl11-libs.x86_64 1:1.1.1g-3.el7                 
    
    Complete!
    [root@localhost ~]# rpm -qa|grep nginx  #Nginx又被装上了
    nginx-filesystem-1.20.1-9.el7.noarch
    nginx-1.20.1-9.el7.x86_64
    [root@localhost ~]# ls
    1.png  2.png  3.png            firefox                        geckodriver      geckodriver-v0.30.0-linux64.tar.gz       hismcw.txt  mcw1     下载
    1.py   2.py   anaconda-ks.cfg  Firefox-latest-x86_64.tar.bz2  geckodriver.log  google-chrome-stable_current_x86_64.rpm  mcw         test.py
    [root@localhost ~]# yum install -y gtk3  #gtk3已经安装过
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Package gtk3-3.22.30-6.el7.x86_64 already installed and latest version
    Nothing to do
    [root@localhost ~]# yum localinstall -y google-chrome-stable_current_x86_64.rpm  #安装上谷歌浏览器
    Loaded plugins: fastestmirror
    Examining google-chrome-stable_current_x86_64.rpm: google-chrome-stable-88.0.4324.150-1.x86_64
    Marking google-chrome-stable_current_x86_64.rpm to be installed
    Resolving Dependencies
    --> Running transaction check
    ---> Package google-chrome-stable.x86_64 0:88.0.4324.150-1 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                 Arch                      Version                             Repository                                               Size
    =====================================================================================================================================================================
    Installing:
     google-chrome-stable                    x86_64                    88.0.4324.150-1                     /google-chrome-stable_current_x86_64                    228 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package
    
    Total size: 228 M
    Installed size: 228 M
    Downloading packages:
    Running transaction check
    Running transaction test
    
    
    Transaction check error:
      installing package google-chrome-stable-88.0.4324.150-1.x86_64 needs 19MB on the / filesystem
    
    Error Summary
    -------------
    Disk Requirements:
      At least 19MB more space needed on the / filesystem.
    
    [root@localhost ~]# rpm -qa|grep chrome  #没有装上谷歌,原因磁盘空间不足
    [root@localhost ~]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda3        19G   19G  222M  99% /
    devtmpfs        479M     0  479M   0% /dev
    tmpfs           489M     0  489M   0% /dev/shm
    tmpfs           489M  6.8M  482M   2% /run
    tmpfs           489M     0  489M   0% /sys/fs/cgroup
    /dev/sda1       473M  111M  362M  24% /boot
    tmpfs            98M  4.0K   98M   1% /run/user/0
    [root@localhost ~]# ls
    1.png  2.png  3.png            firefox                        geckodriver      geckodriver-v0.30.0-linux64.tar.gz       hismcw.txt  mcw1     下载
    1.py   2.py   anaconda-ks.cfg  Firefox-latest-x86_64.tar.bz2  geckodriver.log  google-chrome-stable_current_x86_64.rpm  mcw         test.py
    [root@localhost ~]# mv Firefox-latest-x86_64.tar.bz2  /run/ #移走部分内容,释放一部分空间
    [root@localhost ~]# yum localinstall -y google-chrome-stable_current_x86_64.rpm  #谷歌浏览器被继续安装上
    Loaded plugins: fastestmirror
    Examining google-chrome-stable_current_x86_64.rpm: google-chrome-stable-88.0.4324.150-1.x86_64
    Marking google-chrome-stable_current_x86_64.rpm to be installed
    Resolving Dependencies
    --> Running transaction check
    ---> Package google-chrome-stable.x86_64 0:88.0.4324.150-1 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                 Arch                      Version                             Repository                                               Size
    =====================================================================================================================================================================
    Installing:
     google-chrome-stable                    x86_64                    88.0.4324.150-1                     /google-chrome-stable_current_x86_64                    228 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package
    
    Total size: 228 M
    Installed size: 228 M
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       1/1 
    Redirecting to /bin/systemctl start atd.service
    Failed to start atd.service: Unit not found.
      Verifying  : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       1/1 
    
    Installed:
      google-chrome-stable.x86_64 0:88.0.4324.150-1                                                                                                                      
    
    Complete!
    [root@localhost ~]# rpm -qa|grep chrome #查看谷歌已被安装
    google-chrome-stable-88.0.4324.150-1.x86_64
    [root@localhost ~]# yum history list #查看安装谷歌记录32
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        32 | localinstall -y google-c | 2021-11-01 16:05 | Install        |    1 EE
        31 | history redo 29          | 2021-11-01 16:00 | Install        |    4   
        30 | history undo 29          | 2021-11-01 15:58 | Erase          |    4   
        29 | install -y nginx         | 2021-11-01 15:56 | Install        |    4   
        28 | remove sshpass           | 2021-11-01 15:56 | Erase          |    1   
        27 | install -y sshpass       | 2021-11-01 15:55 | Install        |    1   
        26 | history undo 25          | 2021-11-01 15:53 | Erase          |    1   
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
        13 | -y groupinstall Fonts    | 2021-10-14 11:24 | Install        |   45   
    history list
    [root@localhost ~]# yum history undo 24  # 撤销安装gtk3的记录24,谷歌浏览器依然被卸载掉
    Loaded plugins: fastestmirror
    Undoing transaction 24, from Mon Nov  1 15:51:01 2021
        Install gtk3-3.22.30-6.el7.x86_64 @updates
    Resolving Dependencies
    --> Running transaction check
    ---> Package gtk3.x86_64 0:3.22.30-6.el7 will be erased
    --> Processing Dependency: libgdk-3.so.0()(64bit) for package: google-chrome-stable-88.0.4324.150-1.x86_64
    --> Processing Dependency: libgtk-3.so.0()(64bit) for package: google-chrome-stable-88.0.4324.150-1.x86_64
    --> Running transaction check
    ---> Package google-chrome-stable.x86_64 0:88.0.4324.150-1 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                                        Arch                             Version                                   Repository                           Size
    =====================================================================================================================================================================
    Removing:
     gtk3                                           x86_64                           3.22.30-6.el7                             @updates                             17 M
    Removing for dependencies:
     google-chrome-stable                           x86_64                           88.0.4324.150-1                           installed                           228 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Remove  1 Package (+1 Dependent package)
    
    Installed size: 245 M
    Is this ok [y/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       1/2 
      Erasing    : gtk3-3.22.30-6.el7.x86_64                                                                                                                         2/2 
      Verifying  : gtk3-3.22.30-6.el7.x86_64                                                                                                                         1/2 
      Verifying  : google-chrome-stable-88.0.4324.150-1.x86_64                                                                                                       2/2 
    
    Removed:
      gtk3.x86_64 0:3.22.30-6.el7                                                                                                                                        
    
    Dependency Removed:
      google-chrome-stable.x86_64 0:88.0.4324.150-1                                                                                                                      
    
    Complete!
    [root@localhost ~]# rpm -qa|grep htop  #查看撤销记录24之后的安装,也没有了。
    [root@localhost ~]# yum history list  #查看历史记录
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        33 | history undo 24          | 2021-11-01 16:06 | Erase          |    2   
        32 | localinstall -y google-c | 2021-11-01 16:05 | Install        |    1 EE
        31 | history redo 29          | 2021-11-01 16:00 | Install        |    4   
        30 | history undo 29          | 2021-11-01 15:58 | Erase          |    4   
        29 | install -y nginx         | 2021-11-01 15:56 | Install        |    4   
        28 | remove sshpass           | 2021-11-01 15:56 | Erase          |    1   
        27 | install -y sshpass       | 2021-11-01 15:55 | Install        |    1   
        26 | history undo 25          | 2021-11-01 15:53 | Erase          |    1   
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
        14 | install -y python3       | 2021-10-15 11:23 | Install        |    5   
    history list
    [root@localhost ~]# yum history redo 24 #重做安装gtk3的记录24
    Loaded plugins: fastestmirror
    Repeating transaction 24, from Mon Nov  1 15:51:01 2021
        Install gtk3-3.22.30-6.el7.x86_64 @updates
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package gtk3.x86_64 0:3.22.30-6.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =====================================================================================================================================================================
     Package                             Arch                                  Version                                      Repository                              Size
    =====================================================================================================================================================================
    Installing:
     gtk3                                x86_64                                3.22.30-6.el7                                updates                                4.4 M
    
    Transaction Summary
    =====================================================================================================================================================================
    Install  1 Package
    
    Total download size: 4.4 M
    Installed size: 17 M
    Is this ok [y/d/N]: y
    Downloading packages:
    gtk3-3.22.30-6.el7.x86_64.rpm                                                                                                                 | 4.4 MB  00:00:02     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : gtk3-3.22.30-6.el7.x86_64                                                                                                                         1/1 
      Verifying  : gtk3-3.22.30-6.el7.x86_64                                                                                                                         1/1 
    
    Installed:
      gtk3.x86_64 0:3.22.30-6.el7                                                                                                                                        
    
    Complete!
    [root@localhost ~]# rpm -qa|grep htop #gtk3被装上了,但是记录24之后安装的软件还是没有,
    [root@localhost ~]# rpm -qa|grep chrome
    [root@localhost ~]#  
    
    
    到目前为止,可知撤销很早之前的某个安装记录24,那么这条记录24之后安装的软件也被卸载。即使redo重做记录24也不能更改后面安装的已被卸载掉的结果。
    [root@localhost ~]# yum history list #yum历史记录一般已被限制保留最近的多少条,再远的就看不到了。
    Loaded plugins: fastestmirror
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        34 | history redo 24          | 2021-11-01 16:07 | Install        |    1   
        33 | history undo 24          | 2021-11-01 16:06 | Erase          |    2   
        32 | localinstall -y google-c | 2021-11-01 16:05 | Install        |    1 EE
        31 | history redo 29          | 2021-11-01 16:00 | Install        |    4   
        30 | history undo 29          | 2021-11-01 15:58 | Erase          |    4   
        29 | install -y nginx         | 2021-11-01 15:56 | Install        |    4   
        28 | remove sshpass           | 2021-11-01 15:56 | Erase          |    1   
        27 | install -y sshpass       | 2021-11-01 15:55 | Install        |    1   
        26 | history undo 25          | 2021-11-01 15:53 | Erase          |    1   
        25 | install -y htop          | 2021-11-01 15:52 | Install        |    1   
        24 | install -y gtk3          | 2021-11-01 15:51 | Install        |    1   
        23 | remove gtk3              | 2021-11-01 15:42 | Erase          |    2   
        22 | install -y screen        | 2021-11-01 09:03 | Install        |    1   
        21 | localinstall -y google-c | 2021-11-01 06:43 | Install        |    1 EE
        20 | install -y gtk3          | 2021-11-01 06:42 | Install        |    1   
        19 | remove gtk3              | 2021-11-01 06:41 | Erase          |    2   
        18 | localinstall google-chro | 2021-11-01 06:30 | Install        |    1 EE
        17 | remove gtk2              | 2021-11-01 06:14 | Erase          |    1   
        16 | install -y gtk3          | 2021-11-01 06:06 | Install        |    1   
        15 | remove gtk3              | 2021-11-01 06:02 | Erase          |    2   
    history list
    [root@localhost ~]# yum history undo 33 #撤销撤销过的步骤,是无法挽回不能反撤销的。
    Loaded plugins: fastestmirror
    Undoing transaction 33, from Mon Nov  1 16:06:28 2021
        Erase google-chrome-stable-88.0.4324.150-1.x86_64 @/google-chrome-stable_current_x86_64
        Erase gtk3-3.22.30-6.el7.x86_64                   @updates
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Error: No package(s) available to install
    
    到目前为止,没有发现yum卸载掉的怎么撤销。看来只能yum重装了。这个回退比较坑,万一回到比较远的时间点的,那么 在时间点之后的yum安装就被卸载掉了,万一卸载的是重要的软件麻烦就大了,慎用。
  • 相关阅读:
    MacOS上传文件到windows ftp时软链接文件不见了
    gerrit的使用以及问题总结_gerrit权限和配置
    解决txt乱码:将windows新建txt转换成utf-8格式
    error: exportArchive: The data couldn’t be read because it isn’t in the correct format.
    linux 环境下 apache tomcat 安装jenkins
    ln -s软链接文件算文件吗
    msbuild 编译指定工程时构建脚本的配置
    输入参数的默认值设定${3:-var_d}
    windows下复制文件报错“文件名对目标文件夹可能过长 。您可以缩短文件名并重试,或者......”
    怪物AI之发现玩家(视觉范围发现系列)
  • 原文地址:https://www.cnblogs.com/machangwei-8/p/15494478.html
Copyright © 2011-2022 走看看