Version 1 (modified by skvidal, 10 years ago)

Problems with performing downgrades

There are a number of problems with performing downgrades. I'll cover a few of them here:

  • scriptlets are not reversible: rpm scriptlets provide no way to reverse the process(es) they executed. For example a scriptlet (%pre, %preun, %post, %postun, etc) may run echo "Foo foo foo" >> /etc/some/file. There's no way to undo that when you perform a downgrade.
  • downgrading works provided the user data/user config is not modified by an update in a one-way process.

Examples: mysql upgrade from 4->5 will convert a db, but going back the other way won't fly

upgrading a desktop application from one version to the next major version modifies config files in such a way but cannot modify them back.

  • There are certain processes which no one is ever going to do the work to make them reversible: lvm1->lvm2, db transitions, udev migration, ext3->ext4.

The long and short is downgrades are possible right now. We don't expose them trivially b/c of all the trouble people get into when they perform them.

If you only want to perform a simple downgrade from a minor version or release update of a package then your best bet is to use yumdownloader to fetch the older version and then using rpm -Uvh --replacepkgs --replacefiles --oldpackage file.rpm to downgrade it.