How to Reverse a Yum Update

Sam Varshavchik mrsam at courier-mta.com
Mon Jul 25 02:14:13 UTC 2005


Ping-Wu Zhang writes:

> After a yum update, suppose something goes wrong and I want to revert
> back to the state before the yum update, how do I do that?  Thanks

If you preserved the list of all the packages that yum updated, you can work 
backwords and derive from it a list of all the packages that were removed.

If you did not preserve a list, something like:

rpm -q -a --queryformat '%{INSTALLTIME} %{NAME}-%{VERSION}-%{RELEASE}\n' | sort -n

gives the list of all installed packages, sorted by installation time. I 
suppose that on x86_64 you'll need to throw an %{ARCH} in there, also.

Examining the timestamps at the end of the list you should be able to 
determine which batch of packages were installed recently.

Then, you cross-reference that list of packages against the contents of the 
installation disks and update channels, and come up with the list of 
packages that were removed.

Then, you'll have to manually reinstall the older versions of each package, 
using the right combination of magic flags that tell rpm to accept an 
“upgrade” to an older version of each package.  This is not an automatic 
process -- this is manual, tedious grunge work.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050724/764de77f/attachment-0001.sig>


More information about the fedora-list mailing list