Upgrading Fedora to Newer Version with Yum

Update on Apr. 11, 2014: The latest tools for upgrading Fedora is FedUp, please check How to upgrade Fedora 19 to Fedora 20 through the network.

Please consider PreUpgrade for upgrading Fedora. This is the recommended method.


This post makes a list of actions should be done to upgrade Fedora using yum. Please note that this is for experienced users only, if you are not sure what you are doing and what do these commands mean, please stop here and read the manuals first, or go to Fedora’s Wiki about upgrading Fediora using yum.

This post aims to be a general method, although we use Fedora 15 to Fedora 16 as the example. We configure and install grub2 as the bootloader.

Clean Stuff

It is a good time to remove packages we don’t use. These packages could be candidates for removal, but check to see whether you use them directly or if they are used by applications not backed by rpm packages.

# package-cleanup --leaves

You can find orphaned packages (i.e. packages not in the repositories anymore). This will also show packages which have been partially uninstalled but where the “%postun” script failed.

# package-cleanup --orphans

Do the upgrade

Go to a text console and run in level 3

ctrl + alt + F2
init 3

Update yum first

yum update yum

Clean all cached meta data and packages

yum clean all

Import the key for the newer version’s repository

For Fedora 16, it is

rpm --import https://fedoraproject.org/static/A82BA4B7.txt

Synchronizes the installed package set with the latest packages available

yum --releasever=<release_number_you_want_to_sync_to> distro-sync

For upgrading Fedora 15 to Fedora 16:

yum --releasever=16 --disableplugin=presto  distro-sync

Double check the updated repositories after distro-sync

yum repolist

Update groups

yum groupupdate Base

List all other groups

yum grouplist

and also update them

yum groupupdate ALL GROUPS LISTED

Use grub2 instead of grub

Make configuration for grub2

/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg

Install grub2

/sbin/grub2-install BOOTDEVICE

For example, to install grub2 on sda:

/sbin/grub2-install /dev/sda

Reset services start/stop priorities

cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done

Reboot the system now

After reboot, you may see new kernel version on new Fedora version. For example, kernel 3.1.1 on Fedora 16

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.1.1-1.fc16.x86_64 #1 SMP Fri Nov 11 21:47:56 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Eric Zhiqiang Ma

Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *