Upgrading Fedora Using Yum

Caution

Although upgrades with yum have been tested and work, live upgrades are not recommended by the Fedora Project. If you are not prepared to resolve issues on your own if things break, you should probably use the recommend installation methods instead. With a typical installation, this method usually works well, but it can break third-party packages not available in the Fedora repositories. Please search the mailing list archives first if you run into problems.

The recommended installation method is detailed in the Installation Guide:

http://docs.fedoraproject.org/install-guide/

Preupgrade is a new upgrade method that does in-place upgrade. Refer to

http://www.redhatmagazine.com/2008/04/15/interview-fedora-developers-seth-vidal-and-will-woods/

You can find the preupgrade package from

http://koji.fedoraproject.org/koji/packageinfo?packageID=6045

The release notes also have some useful information:

http://docs.fedoraproject.org/release-notes/f8/en_US/sn-Installer.html#Upgrade-Related-Issues

Other details on upgrading Fedora is available from the wiki page DistributionUpgrades.

Participate

If you want to help make live upgrades work smoothly, join the Live Upgrade Special Interest Group at http://fedoraproject.org/wiki/SIGs/LiveUpgrade.

Feedback

If you are upgrading using Yum and it shows up any general dependency issues, please file them in http://bugzilla.redhat.com.

Instructions to upgrade using yum

1. Read about common problems

Further down in this page there's a list of common problems. Some of them require attention before the upgrade.

2. Clean Stuff

Tip: Review and remove all .rpmsave and .rpmnew files before and after upgrading. Merge and resolve the changes found by the following script: for a in $(find /etc /var -name '*.rpm?*'); do b=${a%.rpm?*}; diff -u $a $b; done 

Now is a good time to remove packages you don't use - especially non-standard packages.

If you have packages from 3rd party repos installed then make sure that these repos are enabled and ready for the new version. The upgrade might fail if there are outdated dependencies from packages not backed by a yum repo or backed by a repo which isn't ready for the new version.

Tip: Find and review "lost" packages. You can find orphaned packages (ie packages not in the repositories anymore) with the tool package-cleanup from the yum-utils package yum install yum-utils; package-cleanup --orphans. Old packages with a failing "%postun" script will remain partly installed. Remove them with rpm -e package-name-and-version. It's often helpful to run this command after the update, too.

Make sure you have the yum-fastestmirror package installed so that yum uses the "best" mirror.

Then remove all traces of the version you are leaving from the yum cache in /var/cache/yum.

3. Switch repositories

Update the packages that decide which yum repositories to use.

For Fedora 9, as an example,

(The architecture doesn't matter for this noarch package.)

Make sure the new repo files isn't placed as .rpmnew files, perhaps by

Also make sure that all the 3rd party repos you normally use point to the repository for the new Fedora release.

4. Do the upgrade

It is a good idea to do this outside the graphical environment. Log out of your graphical desktop and then go to a text console

log in as root, and go into runlevel 3

Tip: Update important packages first. You can start try to update the update machinery first with yum update rpm\* yum\*. Another idea is to start with glibc. In both cases dependencies might however expand it to an almost full upgrade anyway. And doing a full upgrade might be more safe. YMMV.

Upgrade all packages with

yum might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) - uninstall them and try again. Remember to install the packages again if they are essential.

Ensure that all (new) essential packages from the new version is installed with

You might want to update other groups too, see

For example

Before booting you should usually install the bootloader from your new grub by running

- where BOOTDEVICE usually is /dev/sda

Version specific notes

Fedora 8 -> Fedora 9

(One test upgrade from Fedora 7 was problematic for several (potentially irrelevant) reasons. Upgrading from X seems to be a bad idea. YMMV. More testing to come.)

Fedora 7 -> Fedora 8

Fedora Core 6 -> Fedora 7

Fedora Core 5 -> Fedora Core 6

Fedora Core 4 -> Fedora Core 5

Fedora Core 3 -> Fedora Core 4

Problems:

Fedora Core 2 -> Fedora Core 3

Go here for most of this info: http://linux.duke.edu/~skvidal/misc/fc2-fc3-update-with-yum.txt

Fedora Core 1 -> Fedora Core 2

Just Upgrade using anaconda - save yourself a world of pain. But if you really want to try, there's these hints by Seth Vidal: http://linux.duke.edu/~skvidal/misc/fc1-fc2-yum-hints.txt


CategoryFAQ