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’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:

Got a list of all the yum transactions on the system using the yum history command:

# yum history list all
Loaded plugins: fastestmirror
ID | Login user | Date and time | Action(s) | Altered
——————————————————————————-
18 | | 2017-03-24 17:32 | I, U | 8 EE

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 yum history info command:

# yum history info 18
Loaded plugins: fastestmirror
Transaction ID : 18
Begin time : Fri Mar 24 17:32:42 2017
Begin rpmdb : 335:80c8ab3d529a99f5edc0570b5dbf0a9a2475ffda
End time : 17:34:11 2017 (89 seconds)
End rpmdb : 342:0f129cb344b7c87fe9b0f9b0ff74715215284aea
User :
Return-Code : Success
Command Line : update wikid-server-enterprise-4.2.0.b2007-1.noarch.rpm
Transaction performed with:
Installed rpm-4.8.0-55.el6.x86_64 @base
Installed yum-3.2.29-75.el6.centos.noarch @updates
Installed yum-metadata-parser-1.1.2-16.el6.x86_64 @anaconda-CentOS-201311272149.x86_64/6.5
Installed yum-plugin-fastestmirror-1.1.30-37.el6.noarch @base
Packages Altered:
Dep-Install audit-libs-python-2.4.5-3.el6.x86_64 @base
Dep-Install libcgroup-0.40.rc1-18.el6_8.x86_64 @updates
Dep-Install libsemanage-python-2.0.43-5.1.el6.x86_64 @base
Dep-Install policycoreutils-python-2.0.83-30.1.el6_8.x86_64 @updates
Dep-Install rsync-3.0.6-12.el6.x86_64 @base
Dep-Install setools-libs-3.3.7-4.el6.x86_64 @base
Dep-Install setools-libs-python-3.3.7-4.el6.x86_64 @base
Updated wikid-server-enterprise-4.2.0.b1977-1.noarch @/wikid-server-enterprise-4.2.0.b1977-1.noarch
Update 4.2.0.b2007-1.noarch @/wikid-server-enterprise-4.2.0.b2007-1.noarch
Scriptlet output:
1 Stopping Tomcat server … Success!
2 Stopping TimeCop service … Success!
3 Stopping wAuth protocol daemon … Success!
4 RADIUS protocol daemon already stopped.
5 LDAP protocol not enabled.
6 Stopping Logger service … Success!
7 Stopping database … Success!
history info

And then, to downgrade the packages, I used the yum history undo command:

# yum history undo 18
Loaded plugins: fastestmirror
Undoing transaction 18, from Fri Mar 24 17:32:42 2017
Dep-Install audit-libs-python-2.4.5-3.el6.x86_64 @base
Dep-Install libcgroup-0.40.rc1-18.el6_8.x86_64 @updates
Dep-Install libsemanage-python-2.0.43-5.1.el6.x86_64 @base
Dep-Install policycoreutils-python-2.0.83-30.1.el6_8.x86_64 @updates
Dep-Install rsync-3.0.6-12.el6.x86_64 @base
Dep-Install setools-libs-3.3.7-4.el6.x86_64 @base
Dep-Install setools-libs-python-3.3.7-4.el6.x86_64 @base
Updated wikid-server-enterprise-4.2.0.b1977-1.noarch @/wikid-server-enterprise-4.2.0.b1977-1.noarch
Update 4.2.0.b2007-1.noarch @/wikid-server-enterprise-4.2.0.b2007-1.noarch
Loading mirror speeds from cached hostfile
* base: mirror.keystealth.org
* extras: mirror.linuxfix.com
* updates: mirror.sigmanet.com
Failed to downgrade: wikid-server-enterprise-4.2.0.b1977-1.noarch
Resolving Dependencies
–> Running transaction check
—> Package audit-libs-python.x86_64 0:2.4.5-3.el6 will be erased
—> Package libcgroup.x86_64 0:0.40.rc1-18.el6_8 will be erased
—> Package libsemanage-python.x86_64 0:2.0.43-5.1.el6 will be erased
—> Package policycoreutils-python.x86_64 0:2.0.83-30.1.el6_8 will be erased
–> Processing Dependency: policycoreutils-python for package: wikid-server-enterprise-4.2.0.b2007-1.noarch
—> Package rsync.x86_64 0:3.0.6-12.el6 will be erased
—> Package setools-libs.x86_64 0:3.3.7-4.el6 will be erased
—> Package setools-libs-python.x86_64 0:3.3.7-4.el6 will be erased
–> Running transaction check
—> Package wikid-server-enterprise.noarch 0:4.2.0.b2007-1 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

===
Package Arch Version Repository Size
===
Removing:
audit-libs-python x86_64 2.4.5-3.el6 @base 279 k
libcgroup x86_64 0.40.rc1-18.el6_8 @updates 331 k
libsemanage-python x86_64 2.0.43-5.1.el6 @base 312 k
policycoreutils-python x86_64 2.0.83-30.1.el6_8 @updates 1.3 M
rsync x86_64 3.0.6-12.el6 @base 682 k
setools-libs x86_64 3.3.7-4.el6 @base 1.1 M
setools-libs-python x86_64 3.3.7-4.el6 @base 1.6 M
Removing for dependencies:
wikid-server-enterprise noarch 4.2.0.b2007-1 @/wikid-server-enterprise-4.2.0.b2007-1.noarch 99 M

Transaction Summary
===
Remove 8 Package(s)

Installed size: 104 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Stopping Tomcat server … Success!
TimeCop process already stopped.
wAuth protocol daemon already stopped.
RADIUS protocol daemon already stopped.
LDAP protocol not enabled.
Stopping Logger service … Success!
Stopping database … Success!
Erasing : wikid-server-enterprise-4.2.0.b2007-1.noarch 1/8
Erasing : policycoreutils-python-2.0.83-30.1.el6_8.x86_64 2/8
Erasing : setools-libs-python-3.3.7-4.el6.x86_64 3/8
Erasing : setools-libs-3.3.7-4.el6.x86_64 4/8
Erasing : audit-libs-python-2.4.5-3.el6.x86_64 5/8
Erasing : libcgroup-0.40.rc1-18.el6_8.x86_64 6/8
Erasing : libsemanage-python-2.0.43-5.1.el6.x86_64 7/8
Erasing : rsync-3.0.6-12.el6.x86_64 8/8
Verifying : rsync-3.0.6-12.el6.x86_64 1/8
Verifying : wikid-server-enterprise-4.2.0.b2007-1.noarch 2/8
Verifying : policycoreutils-python-2.0.83-30.1.el6_8.x86_64 3/8
Verifying : libsemanage-python-2.0.43-5.1.el6.x86_64 4/8
Verifying : setools-libs-python-3.3.7-4.el6.x86_64 5/8
Verifying : libcgroup-0.40.rc1-18.el6_8.x86_64 6/8
Verifying : audit-libs-python-2.4.5-3.el6.x86_64 7/8
Verifying : setools-libs-3.3.7-4.el6.x86_64 8/8

Removed:
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
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

Dependency Removed:
wikid-server-enterprise.noarch 0:4.2.0.b2007-1

Complete!

Now, in my case, I was not able downgrade the software package directly, as you can tell from the “Failed to downgrade:” message for the wikid server, the heavy lifting was done.
All I had to do, is install the original package using yum, and I was back in business:

# yum install wikid-server-enterprise-4.2.0.b1977-1.noarch.rpm

And, start the application back up:

# wikidctl start