{"id":1523,"date":"2017-03-24T18:12:40","date_gmt":"2017-03-25T01:12:40","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1523"},"modified":"2017-03-24T18:12:40","modified_gmt":"2017-03-25T01:12:40","slug":"back-out-a-yum-update","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1523","title":{"rendered":"Back out a yum update."},"content":{"rendered":"<p>Boy, I tell ya, the more I learn about linux, the more I love it.  Especially, yum.  Something was wrong after I used yum to update a package.  I didn&#8217;t have time to look into it in detail, so I just wanted to back out the change and downgrade the packages that were updated during the update and restore functionality.  My initial thought was to restore a snapshot of the system from the night before, but I thought better and decided I would try to rollback the installation and downgrade the application.  This is what I did:<\/p>\n<p>Got a list of all the yum transactions on the system using the yum history command:<\/p>\n<blockquote><p># yum history list all<br \/>\nLoaded plugins: fastestmirror<br \/>\nID     | Login user               | Date and time    | Action(s)      | Altered<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n    18 |  <jgz>                   | 2017-03-24 17:32 | I, U           |    8 EE<br \/>\n&#8230;<\/p><\/blockquote>\n<p>Then, based on the time, I was to determine the transaction ID to get more information about the transaction to verify I had the correct one using the <em>yum history info<\/em> command:<\/p>\n<blockquote><p># yum history info 18<br \/>\nLoaded plugins: fastestmirror<br \/>\nTransaction ID : 18<br \/>\nBegin time     : Fri Mar 24 17:32:42 2017<br \/>\nBegin rpmdb    : 335:80c8ab3d529a99f5edc0570b5dbf0a9a2475ffda<br \/>\nEnd time       :            17:34:11 2017 (89 seconds)<br \/>\nEnd rpmdb      : 342:0f129cb344b7c87fe9b0f9b0ff74715215284aea<br \/>\nUser           :  <jgz><br \/>\nReturn-Code    : Success<br \/>\nCommand Line   : update wikid-server-enterprise-4.2.0.b2007-1.noarch.rpm<br \/>\nTransaction performed with:<br \/>\n    Installed     rpm-4.8.0-55.el6.x86_64                       @base<br \/>\n    Installed     yum-3.2.29-75.el6.centos.noarch               @updates<br \/>\n    Installed     yum-metadata-parser-1.1.2-16.el6.x86_64       @anaconda-CentOS-201311272149.x86_64\/6.5<br \/>\n    Installed     yum-plugin-fastestmirror-1.1.30-37.el6.noarch @base<br \/>\nPackages Altered:<br \/>\n    Dep-Install audit-libs-python-2.4.5-3.el6.x86_64            @base<br \/>\n    Dep-Install libcgroup-0.40.rc1-18.el6_8.x86_64              @updates<br \/>\n    Dep-Install libsemanage-python-2.0.43-5.1.el6.x86_64        @base<br \/>\n    Dep-Install policycoreutils-python-2.0.83-30.1.el6_8.x86_64 @updates<br \/>\n    Dep-Install rsync-3.0.6-12.el6.x86_64                       @base<br \/>\n    Dep-Install setools-libs-3.3.7-4.el6.x86_64                 @base<br \/>\n    Dep-Install setools-libs-python-3.3.7-4.el6.x86_64          @base<br \/>\n    Updated     wikid-server-enterprise-4.2.0.b1977-1.noarch    @\/wikid-server-enterprise-4.2.0.b1977-1.noarch<br \/>\n    Update                              4.2.0.b2007-1.noarch    @\/wikid-server-enterprise-4.2.0.b2007-1.noarch<br \/>\nScriptlet output:<br \/>\n   1 Stopping Tomcat server &#8230; Success!<br \/>\n   2 Stopping TimeCop service &#8230; Success!<br \/>\n   3 Stopping wAuth protocol daemon &#8230; Success!<br \/>\n   4 RADIUS protocol daemon already stopped.<br \/>\n   5 LDAP protocol not enabled.<br \/>\n   6 Stopping Logger service &#8230; Success!<br \/>\n   7 Stopping database &#8230; Success!<br \/>\nhistory info<\/p><\/blockquote>\n<p>And then, to downgrade the packages, I used the <em>yum history undo<\/em> command:<\/p>\n<blockquote><p># yum history undo 18<br \/>\nLoaded plugins: fastestmirror<br \/>\nUndoing transaction 18, from Fri Mar 24 17:32:42 2017<br \/>\n    Dep-Install audit-libs-python-2.4.5-3.el6.x86_64            @base<br \/>\n    Dep-Install libcgroup-0.40.rc1-18.el6_8.x86_64              @updates<br \/>\n    Dep-Install libsemanage-python-2.0.43-5.1.el6.x86_64        @base<br \/>\n    Dep-Install policycoreutils-python-2.0.83-30.1.el6_8.x86_64 @updates<br \/>\n    Dep-Install rsync-3.0.6-12.el6.x86_64                       @base<br \/>\n    Dep-Install setools-libs-3.3.7-4.el6.x86_64                 @base<br \/>\n    Dep-Install setools-libs-python-3.3.7-4.el6.x86_64          @base<br \/>\n    Updated     wikid-server-enterprise-4.2.0.b1977-1.noarch    @\/wikid-server-enterprise-4.2.0.b1977-1.noarch<br \/>\n    Update                              4.2.0.b2007-1.noarch    @\/wikid-server-enterprise-4.2.0.b2007-1.noarch<br \/>\nLoading mirror speeds from cached hostfile<br \/>\n * base: mirror.keystealth.org<br \/>\n * extras: mirror.linuxfix.com<br \/>\n * updates: mirror.sigmanet.com<br \/>\nFailed to downgrade: wikid-server-enterprise-4.2.0.b1977-1.noarch<br \/>\nResolving Dependencies<br \/>\n&#8211;> Running transaction check<br \/>\n&#8212;> Package audit-libs-python.x86_64 0:2.4.5-3.el6 will be erased<br \/>\n&#8212;> Package libcgroup.x86_64 0:0.40.rc1-18.el6_8 will be erased<br \/>\n&#8212;> Package libsemanage-python.x86_64 0:2.0.43-5.1.el6 will be erased<br \/>\n&#8212;> Package policycoreutils-python.x86_64 0:2.0.83-30.1.el6_8 will be erased<br \/>\n&#8211;> Processing Dependency: policycoreutils-python for package: wikid-server-enterprise-4.2.0.b2007-1.noarch<br \/>\n&#8212;> Package rsync.x86_64 0:3.0.6-12.el6 will be erased<br \/>\n&#8212;> Package setools-libs.x86_64 0:3.3.7-4.el6 will be erased<br \/>\n&#8212;> Package setools-libs-python.x86_64 0:3.3.7-4.el6 will be erased<br \/>\n&#8211;> Running transaction check<br \/>\n&#8212;> Package wikid-server-enterprise.noarch 0:4.2.0.b2007-1 will be erased<br \/>\n&#8211;> Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>===<br \/>\n Package                                   Arch                     Version                              Repository                                                        Size<br \/>\n===<br \/>\nRemoving:<br \/>\n audit-libs-python                         x86_64                   2.4.5-3.el6                          @base                                                            279 k<br \/>\n libcgroup                                 x86_64                   0.40.rc1-18.el6_8                    @updates                                                         331 k<br \/>\n libsemanage-python                        x86_64                   2.0.43-5.1.el6                       @base                                                            312 k<br \/>\n policycoreutils-python                    x86_64                   2.0.83-30.1.el6_8                    @updates                                                         1.3 M<br \/>\n rsync                                     x86_64                   3.0.6-12.el6                         @base                                                            682 k<br \/>\n setools-libs                              x86_64                   3.3.7-4.el6                          @base                                                            1.1 M<br \/>\n setools-libs-python                       x86_64                   3.3.7-4.el6                          @base                                                            1.6 M<br \/>\nRemoving for dependencies:<br \/>\n wikid-server-enterprise                   noarch                   4.2.0.b2007-1                        @\/wikid-server-enterprise-4.2.0.b2007-1.noarch                    99 M<\/p>\n<p>Transaction Summary<br \/>\n===<br \/>\nRemove        8 Package(s)<\/p>\n<p>Installed size: 104 M<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\nRunning rpm_check_debug<br \/>\nRunning Transaction Test<br \/>\nTransaction Test Succeeded<br \/>\nRunning Transaction<br \/>\nStopping Tomcat server &#8230; Success!<br \/>\nTimeCop process already stopped.<br \/>\nwAuth protocol daemon already stopped.<br \/>\nRADIUS protocol daemon already stopped.<br \/>\nLDAP protocol not enabled.<br \/>\nStopping Logger service &#8230; Success!<br \/>\nStopping database &#8230; Success!<br \/>\n  Erasing    : wikid-server-enterprise-4.2.0.b2007-1.noarch                                                                                                                 1\/8<br \/>\n  Erasing    : policycoreutils-python-2.0.83-30.1.el6_8.x86_64                                                                                                              2\/8<br \/>\n  Erasing    : setools-libs-python-3.3.7-4.el6.x86_64                                                                                                                       3\/8<br \/>\n  Erasing    : setools-libs-3.3.7-4.el6.x86_64                                                                                                                              4\/8<br \/>\n  Erasing    : audit-libs-python-2.4.5-3.el6.x86_64                                                                                                                         5\/8<br \/>\n  Erasing    : libcgroup-0.40.rc1-18.el6_8.x86_64                                                                                                                           6\/8<br \/>\n  Erasing    : libsemanage-python-2.0.43-5.1.el6.x86_64                                                                                                                     7\/8<br \/>\n  Erasing    : rsync-3.0.6-12.el6.x86_64                                                                                                                                    8\/8<br \/>\n  Verifying  : rsync-3.0.6-12.el6.x86_64                                                                                                                                    1\/8<br \/>\n  Verifying  : wikid-server-enterprise-4.2.0.b2007-1.noarch                                                                                                                 2\/8<br \/>\n  Verifying  : policycoreutils-python-2.0.83-30.1.el6_8.x86_64                                                                                                              3\/8<br \/>\n  Verifying  : libsemanage-python-2.0.43-5.1.el6.x86_64                                                                                                                     4\/8<br \/>\n  Verifying  : setools-libs-python-3.3.7-4.el6.x86_64                                                                                                                       5\/8<br \/>\n  Verifying  : libcgroup-0.40.rc1-18.el6_8.x86_64                                                                                                                           6\/8<br \/>\n  Verifying  : audit-libs-python-2.4.5-3.el6.x86_64                                                                                                                         7\/8<br \/>\n  Verifying  : setools-libs-3.3.7-4.el6.x86_64                                                                                                                              8\/8 <\/p>\n<p>Removed:<br \/>\n  audit-libs-python.x86_64 0:2.4.5-3.el6  libcgroup.x86_64 0:0.40.rc1-18.el6_8  libsemanage-python.x86_64 0:2.0.43-5.1.el6  policycoreutils-python.x86_64 0:2.0.83-30.1.el6_8<br \/>\n  rsync.x86_64 0:3.0.6-12.el6             setools-libs.x86_64 0:3.3.7-4.el6     setools-libs-python.x86_64 0:3.3.7-4.el6   <\/p>\n<p>Dependency Removed:<br \/>\n  wikid-server-enterprise.noarch 0:4.2.0.b2007-1                                                                                                                                <\/p>\n<p>Complete!<\/p><\/blockquote>\n<p>Now, in my case, I was not able downgrade the software package directly, as you can tell from the &#8220;Failed to downgrade:&#8221; message for the wikid server, the heavy lifting was done.<br \/>\nAll I had to do, is install the original package using yum, and I was back in business:<\/p>\n<blockquote><p># yum install wikid-server-enterprise-4.2.0.b1977-1.noarch.rpm <\/p><\/blockquote>\n<p>And, start the application back up:<\/p>\n<blockquote><p># wikidctl start<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Boy, I tell ya, the more I learn about linux, the more I love it. Especially, yum. Something was wrong after I used yum to update a package. I didn&#8217;t have time to look into it in detail, so I just wanted to back out the change and downgrade the packages that were updated during [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[281,215],"class_list":["post-1523","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-downgrade","tag-yum"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1523"}],"version-history":[{"count":3,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1523\/revisions"}],"predecessor-version":[{"id":1526,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1523\/revisions\/1526"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}