Friday, February 8, 2013

Redhat Linux : Rollback RPMs

RPM Rollback for Redhat 5.x versions

1) Create a file /etc/rpm/macros and put following

cat >> /etc/rpm/macros
%_repackage_all_erasures 1

2) Add following at the end of /etc/yum.conf

echo "tsflags=repackage" >> /etc/yum.conf

After above entries, we can rollback rpms installed using yum

3) Now update system with single rpm or complete using

yum update

4) Lets say we had update rpms 1 hour, 2 month and 1 day ago and wants to remove all those then use following commands:

rpm --rollback "1 day ago"
rpm --rollback "1hour ago"
rpm --rollback "2 month ago"


Will be posting for Redhat 6.x version soon.......

No comments:

Post a Comment