LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   rollback yum update on CentOS 6 (https://www.linuxquestions.org/questions/linux-server-73/rollback-yum-update-on-centos-6-a-4175502630/)

wwipro 04-22-2014 07:28 PM

rollback yum update on CentOS 6
 
I did # yum update on a CentOS 6 box.

ID | Login user | Date and time | Action(s) Altered
----------------------------------------------
22 | root <root> | 2014-04-22 15:56 | E, I, U 300 EE


# yum history info 22
Loaded plugins: fastestmirror, refresh-packagekit, security
Transaction ID : 22
Begin time : Tue Apr 22 15:56:50 2014
Begin rpmdb : 946:ba84735507bc51a280d5a0a9985107e8bf1b396a
End time : 16:35:11 2014 (38 minutes)
End rpmdb : 961:8b9a2813c1a3c89ddfeca4abc00e5e97c055549d
User : root <root>
Return-Code : Success
Command Line : update
Transaction performed with:
Updated rpm-4.8.0-32.el6.i686 @base
Updated yum-3.2.29-40.el6.centos.noarch @base
Installed yum-metadata-parser-1.1.2-16.el6.i686 @anaconda-CentOS-201207051201.i386/6.3
Updated yum-plugin-fastestmirror-1.1.30-14.el6.noarch @anaconda-CentOS-201207051201.i386/6.3
Packages Altered:
Updated ModemManager-0.4.0-3.git20100628.el6.i686 @base
Update 0.4.0-5.git20100628.el6.i686 @base
Updated NetworkManager-1:0.8.1-61.el6_4.i686 @updates
... (skip a few)
Updated yum-plugin-security-1.1.30-14.el6.noarch @anaconda-CentOS-201207051201.i386/6.3
Update 1.1.30-17.el6_5.noarch @updates
Updated yum-utils-1.1.30-14.el6.noarch @anaconda-CentOS-201207051201.i386/6.3
Update 1.1.30-17.el6_5.noarch @updates
#

Like to rollback the update I just did.
Reason? Prepare procedure to rollback a major update on RH/CentOS 6 environment. Don’t want to do any update on production environment without a valid recovery strategy.

Issue command:
# yum history redo 22
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos-distro.cavecreek.net
* extras: centos-distro.cavecreek.net
* updates: mirrors.easynews.com
Undoing transaction 22, from Tue Apr 22 15:56:50 2014
Updated ModemManager-0.4.0-3.git20100628.el6.i686 @base
Update 0.4.0-5.git20100628.el6.i686 @base
Updated NetworkManager-1:0.8.1-61.el6_4.i686 @updates
Update 1:0.8.1-66.el6.i686 @base
Updated NetworkManager-glib-1:0.8.1-61.el6_4.i686
@updates
Update 2.0.8-21.el6.centos.i686 @base
Updated abrt-addon-ccpp-2.0.8-16.el6.centos.1.i686 @updates
Update 2.0.8-21.el6.centos.i686 @base
Failed to downgrade: ModemManager-0.4.0-3.git20100628.el6.i686
Failed to downgrade: 1:NetworkManager-0.8.1-61.el6_4.i686
Failed to downgrade: 1:NetworkManager-glib-0.8.1-61.el6_4.i686
Failed to downgrade: 1:NetworkManager-gnome-0.8.1-61.el6_4.i686
Failed to downgrade: abrt-2.0.8-16.el6.centos.1.i686
Failed to downgrade: abrt-addon-ccpp-2.0.8-16.el6.centos.1.i686
… (skip a few)
---> Package krb5-workstation.i686 0:1.10.3-10.el6_4.6 will be a downgrade
---> Package krb5-workstation.i686 0:1.10.3-15.el6_5.1 will be erased
---> Package libXfont.i686 0:1.4.5-2.el6 will be a downgrade
---> Package libXfont.i686 0:1.4.5-3.el6_5 will be erased
---> Package libgdata.i686 0:0.6.4-2.el6 will be erased
… (skip a few)
Error: Package: yum-3.2.29-40.el6.centos.noarch (base)
Requires: yum-metadata-parser >= 1.1.0
Removing: yum-metadata-parser-1.1.2-16.el6.i686 (@anaconda-CentOS-201207051201.i386/6.3)
yum-metadata-parser = 1.1.2-16.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
#

Seems like yum history redo is only working when rolling back single package.

O/S: CentOS 6.

Thanks.

kbp 04-23-2014 08:33 PM

Could you try:
Code:

yum history redo force-reinstall 22

eklavya 04-26-2014 01:16 AM

or
http://www.if-not-true-then-false.co...redo-undo-new/


All times are GMT -5. The time now is 03:16 AM.