From Fedora Project Wiki

No edit summary
mNo edit summary
(202 intermediate revisions by 76 users not shown)
Line 1: Line 1:
{{autolang|base=yes}}
{{autolang|base=yes}}


This page contains information explaining how to upgrade Fedora using {{command|yum}}.
{{admon/warning|Although upgrades with yum do work, they are not explicitly tested as part of the release process by [[QA|Fedora QA]] and are not documented in the [http://docs.fedoraproject.org/en-US/Fedora/{{FedoraVersion}}/html/Installation_Guide/index.html Fedora installation guide].  If you are not prepared to resolve issues on your own if things break, you should probably use the [[Upgrading|recommended installation methods]] instead.}}


== Recommendations ==
This page contains information explaining how to upgrade Fedora using {{command|yum}} or {{command|dnf}}: in general the instructions apply equally to both tools, you may substitute one for the other at any point. {{command|dnf}} is the default tool for Fedora 22 and later, {{command|yum}} for Fedora 21 and earlier.


The recommended installation method is with a boot media with the Anaconda installer as detailed in the [http://docs.fedoraproject.org/install-guide/ Installation Guide] or use [[PreUpgrade]]
== Upgrading Fedora using yum directly ==


[[PreUpgrade]] is a slightly different upgrade method where all the packages are downloaded before the system is rebooted into the Anaconda installer.
When upgrading with yum you don't get any help from [[Upgrading|the recommended upgrade mechanisms]], but with a typical system you might be able to upgrade systems remotely over ssh and with limited downtime. (You will still need to reboot to get the new kernel and system libraries/services running).


== For direct yum upgrades ==
A live upgrade with yum usually works well with a typical installation and when following the advice below.
 
{{admon/note| Although upgrades with yum works, it is not explicitly tested as part of the release process by the Fedora Project. If you are not prepared to resolve issues on your own if things break, you should probably use the recommended installation methods instead.}}
 
When upgrading with yum you don't get any help from Anaconda, but if you are lucky you might be able to upgrade systems remotely over ssh and with limited downtime. (You will still need to reboot to get the new kernel and system libraries/services running) Rebooting after such an upgrade is always very exciting.
 
A live upgrade with yum usually works well with a typical installation and when following the advice below.  


== Participate ==
== Participate ==


If you are upgrading using Yum and it shows any general dependency issues, please file them in http://bugzilla.redhat.com. But please read this page, all references pages and search the mailing list archives before filing bugs. And of course, please help keep this page updated.
If you are upgrading using Yum and it shows any general dependency issues, please file them in [http://bugzilla.redhat.com Bugzilla]. But please read this page, all references pages and search the mailing list archives before filing bugs. And of course, please help keep this page updated.


If you want to help make live upgrades work smoothly, join the [[SIGs/LiveUpgrade | Live Upgrade Special Interest Group]].
If you want to help make live upgrades work smoothly, join the [[SIGs/LiveUpgrade | Live Upgrade Special Interest Group]].
Line 25: Line 19:
== Instructions to upgrade using yum ==
== Instructions to upgrade using yum ==


=== 1.  Back up your system ===
=== 1.  Backup your system ===


Back up any personal data to an external hard drive or to another machine.  If there is some unrecoverable error that requires a fresh install, you don't want to lose any data.
Backup any personal data to an external hard drive or to another machine.  If there is some unrecoverable error that requires a fresh install, you don't want to lose any data.


=== 2. Read about common problems ===
=== 2. Read about common problems ===


Further down in this page there is a list of common problems for specific versions. Some of them require attention before the upgrade.
Further down in this page there is a list of common problems specific to yum upgrades for specific versions. Some of them require attention before the upgrade.


General advice on upgrading Fedora can be found on the [[Upgrading]] page. You should also read the [http://docs.fedoraproject.org/install-guide/ Installation Guide] and [http://docs.fedoraproject.org/release-notes/ Release Notes] for the version you plan to upgrade to - they contain important information regarding upgrading issues. Finally, check the list of [[Common bugs]].
General advice on upgrading Fedora can be found on the [[Upgrading]] page. You should also read the [http://docs.fedoraproject.org/install-guide/ Installation Guide] and [http://docs.fedoraproject.org/release-notes/ Release Notes] for the version you plan to upgrade to - they contain important information regarding upgrading issues. Finally, check the list of [[Common bugs]].
Line 40: Line 34:


{{admon/tip|Find unused config files|Merge and resolve the changes found by the following script: <code>yum install rpmconf; rpmconf -a</code>
{{admon/tip|Find unused config files|Merge and resolve the changes found by the following script: <code>yum install rpmconf; rpmconf -a</code>
Now find and remove old config which nobody owns: <code>find /etc /var -name '*.rpm?*'</code>}}
Now find and remove old config which nobody owns: <code>find /etc /var -name '*?.rpm?*'</code>}}


Now is a good time to remove packages you don't use - especially non-standard packages.
Now is a good time to remove packages you don't use - especially non-standard packages.
Line 50: Line 44:
{{admon/tip|Find and review "lost" packages| You can find orphaned packages (ie packages not in the repositories anymore) with: <code>package-cleanup --orphans</code>. This will also show packages which have been partially uninstalled but where the "%postun" script failed.}}
{{admon/tip|Find and review "lost" packages| You can find orphaned packages (ie packages not in the repositories anymore) with: <code>package-cleanup --orphans</code>. This will also show packages which have been partially uninstalled but where the "%postun" script failed.}}


Then remove all traces of the version you are leaving from the yum cache in <code>/var/cache/yum</code>.
=== 4. Do the upgrade ===
 
If you have 3rd party repositories configured, you may need to adjust them for the new Fedora version. If you switch from one Fedora release to another there is often nothing that needs to be done.  If you switch to Rawhide from a standard Fedora release (or vice versa) then most of the time you will need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).
 
Note that the upgrade is likely to fail if there are outdated dependencies from packages not backed by a yum repository or backed by a repository which isn't ready for the new version.
 
It is a good idea to do the upgrade outside the graphical environment. Log out of your graphical desktop and then
 
==== fedora-upgrade ====
 
A small script named fedora-upgrade is available which aims to automate the process outlined below. To run it, do the following


<pre>
<pre>$ sudo yum install fedora-upgrade
yum clean all
$ sudo fedora-upgrade
</pre>
</pre>


=== 5. Do the upgrade ===
When performing upgrade via remote shell, it is good idea to use screen or tmux utility to be able to get back to running transaction in case your connection drops.
 
If you have 3rd party repositories configured, you may need to adjust them for the new Fedora version. If you switch from one Fedora release to another there is often nothing that needs to be done.  If you switch to Rawhide from a standard Fedora release (or vice versa) then most of the time you will need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).


Note that the upgrade is likely to fail if there are outdated dependencies from packages not backed by a yum repository or backed by a repository which isn't ready for the new version.
Alternatively, follow the manual steps:


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


<pre>
<pre>
Line 70: Line 72:
(or)
(or)


log in as root, and go into runlevel 3
log in as root, and go into multi-user.target
 
<pre>
systemctl isolate multi-user.target
</pre>
 
==== Update yum to latest version available in your Fedora version ====


<pre>
<pre>
init 3
# yum update yum
</pre>
</pre>


{{admon/warning|Once a live upgrade is started do not stop the upgrade by rebooting, killing the process, or by any other method until it is complete, doing so will cause the affected system to be in a mixed state. Partially the old release and partially the new release. In this state the system will not be reliable and will not operate as expected. you can try running yum distro-sync and package-cleanup --problems to try and fix the problems. }}
==== Install the new fedora gpg key for the version you are updating to ====
 
Keys you may find and verify at
 
https://fedoraproject.org/keys
 
or see a version specific update instructions at the bottom.


{{admon/tip|Update all packages at once| Although you can try to update the update machinery first with <code>yum update rpm\* yum\*</code> or with <code>glibc</code>, in both cases dependencies might expand it to an almost full upgrade anyway, and simply doing a full upgrade might be more safe (but your mileage may vary). (In particular, do not upgrade rpm and yum separately if upgrading to a system with a different version of python e.g. 2.4 to 2.5.)
==== Clean the cache ====
}}


First install the new fedora 14 gpg key. You may wish to verify this package against  https://fedoraproject.org/keys and the fedora ssl certificate.
Then remove all traces of the version you are leaving from the yum cache in <code>/var/cache/yum</code>.


<pre>
<pre>
rpm --import https://fedoraproject.org/static/97A1071F.txt
# yum clean all
</pre>
</pre>


Then upgrade all packages with
==== Upgrade all packages ====
 
{{admon/warning|Once a live upgrade is started, do not stop the upgrade by rebooting, killing the process, or by any other method until it is complete. Interrupting an upgrade will cause the affected system to be in a mixed state -- partially the old release and partially the new release.  In this state, the system will not be reliable and will not operate as expected.  You can try running yum distro-sync and package-cleanup --problems to try and fix the problems. }}


<pre>
<pre>
yum update yum
# yum --releasever=<release_number_you_want_to_sync_to> distro-sync
yum --releasever=14 distro-sync --skip-broken
</pre>
</pre>


This will usually take care of upgrades for the third party repositories you have enabled as well. Confirm with <pre> yum repolist </pre>  after the upgrade process is over<code>yum</code> 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.
{{admon/warning|If you experience any dependency problems, you have to solve them manually. Most often it is enough to remove several problematic package(s). Be very careful when doing so however.
}}
 
'''Note:''' While it is recommended to upgrade to intermediate releases if upgrading from an older release (for example upgrading from Fedora 19 to 20, then 20 to 21), depending on what version you are upgrading from, this step may fail with an error about GPG keys being in the wrong formatTo overcome this, you can add the "--nogpgcheck" switch to the above yum distro-sync command.
 
=== 5. Make sure Fedora is upgraded ===


Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well.  Confirm with <pre> yum repolist </pre>  after the upgrade process is over.  <code>yum</code> 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 are installed with
Ensure that all (new) essential packages from the new version are installed with


<pre>
<pre>
yum groupupdate Base
# yum groupupdate 'Minimal Install'
</pre>
</pre>


Line 106: Line 126:


<pre>
<pre>
yum grouplist
# yum grouplist
</pre>
</pre>


Line 112: Line 132:


<pre>
<pre>
yum groupupdate "GNOME Desktop Environment" \
# yum groupupdate "GNOME Desktop" \
"Development Tools" "Server Configuration Tools" \
    "Development Tools" "Sound and Video" \
"Hardware Support" "Sound and Video" \
    "Games and Entertainment" "Administration Tools" \
"Graphical Internet" "Fonts" \
    "Office/Productivity" "System Tools"
"Games and Entertainment" "Printing Software" \
"Administration Tools" "Office/Productivity" "System Tools"
</pre>
</pre>


=== 6. Preparing for reboot ===
=== 6. Preparing for reboot ===
{{Anchor|bootloader}}


Before booting you should usually install the bootloader from your new grub by running
Before booting you should usually install the bootloader from your new grub by running
<pre>
<pre>
/sbin/grub-install BOOTDEVICE
/usr/sbin/grub2-install BOOTDEVICE
</pre>
- where BOOTDEVICE is usually <code>/dev/sda</code> (If you get an error '/dev/sda does not have any corresponding BIOS drive' from that, then try <tt>/usr/sbin/grub2-install --recheck /dev/sda</tt>).
 
It might also be necessary to update the grub config file:
<pre>
cp --backup=numbered -a /boot/grub2/grub.cfg{,.bak} # create backup copy
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg # update config file
</pre>
</pre>
- where BOOTDEVICE is usually <code>/dev/sda</code> (If you get an error '/dev/sda does not have any corresponding BIOS drive' from that, then try <tt>/sbin/grub-install --recheck /dev/sda</tt>.)


Also, the order of init scripts could have changed from the previous version. A command to reset the order is:
Also, the order of init scripts could have changed from the previous version. A command to reset the order is:
<pre>
<pre>
cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done
cd /etc/rc.d/init.d; for f in *; do [ -x $f ] && /sbin/chkconfig $f resetpriorities; done
</pre>
</pre>


Again, run <code>package-cleanup --orphans</code> to find packages that haven't been upgraded.
=== 7. Cleanup your system ===
Again, cleanup your system as described in section 2. Also you might want to remove some cache files that are no longer used, for example files from older Fedora releases in the following directories:
 
* <nowiki>/var/cache/yum</nowiki>
* <nowiki>/var/cache/dnf</nowiki>
* <nowiki>/var/cache/mock</nowiki>
* <nowiki>/var/lib/mock</nowiki>


== Version specific notes ==
== Version specific notes ==
Line 141: Line 173:
If you are upgrading to a final release from an alpha, beta, preview, or other [[Releases/Rawhide|Rawhide]] release, please see [[Upgrading from pre-release to final]].
If you are upgrading to a final release from an alpha, beta, preview, or other [[Releases/Rawhide|Rawhide]] release, please see [[Upgrading from pre-release to final]].


=== To development version ===
{{Anchor|Rawhide}}
=== To rawhide ===
 
{{admon/warning| Rawhide is the development branch of Fedora.  It is meant to be used by developers and testers to provide feedback to the Fedora Project.}}
 
See the [[Releases/Rawhide|Rawhide]] release page for more information on Rawhide.


<pre>
<pre>
yum update yum
# dnf install dnf-plugins-core fedora-repos-rawhide
yum --releasever=rawhide distro-sync --skip-broken
# dnf config-manager --set-disabled fedora updates updates-testing
# dnf config-manager --set-enabled rawhide
# dnf clean -q dbcache plugins metadata
# dnf --releasever=rawhide --setopt=deltarpm=false distro-sync --nogpgcheck
 
## Optional: it is generally advised to do a selinux autorelabel and reboot
# touch /.autorelabel
</pre>
</pre>


{{Anchor|13-14}}


=== Fedora 13 -> Fedora 14 ===
{{Anchor|20-21}}
 
=== Fedora 22 -> Fedora 23 ===
 
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-$(uname -i)
# dnf upgrade
# dnf clean all
# dnf --releasever=23 --setopt=deltarpm=false distro-sync --nogpgcheck
 
=== Fedora 21 -> Fedora 22 ===
 
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-22-$(uname -i)
# yum update yum
# yum clean all
# yum --releasever=22 distro-sync
 
=== Fedora 20 -> Fedora 21 ===
 
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-$(uname -i)
# yum update yum
# yum clean all
# yum --releasever=21 distro-sync
 
Fedora 21 split into different products. Execute '''one''' of those commands:
 
# yum install system-release-workstation
# yum install system-release-cloud
# yum install system-release-server
 
or this one if you want to have non-productized Fedora
 
# yum install system-release-nonproduct


Upgrade all packages with
If you change your mind, you can easily switch between products.


<pre>
# yum swap system-release-cloud system-release-workstation
yum update yum
yum --releasever=14 distro-sync --skip-broken
</pre>


Swapping to workstation sometimes may require you to use {{command|yum shell}} as it may require multiple packages to be swapped.


{{Anchor|12-13}}
Many people report (e.g. bugs 1035326, 1044184, 1002331) that after upgrade some files have incorrect SELinux context. It is recommend to run:
=== Fedora 12 -> Fedora 13 ===
* Testing shows that upgrading within X will cause X to hang when installing <code>bitmap-fonts-compat</code>, but it can be done anyway by making sure that <code>bitmap-fonts-compat</code> is the last package to update ... YMMV.
* Intel video no longer works without Kernel Mode Setting (KMS). You must remove 'nomodeset' from your /etc/grub.conf kernel command line, if present.
* nVidia video no longer works without kernel mode Setting (KMS). You must remove 'nomodeset' from your /etc/grub.conf kernel command line, if present.
* It may be necessary to run "db_recover -h /var/lib/ldap/ ; chown ldap:ldap /var/lib/ldap/*" once in order for slapd to start.


{{Anchor|11-12}}
  # restorecon -R /


=== Fedora 11 -> Fedora 12 ===
Appear to be enable to shutdown/reboot gracefully afterwards:


* All Fedora 12 RPM packages use XZ/LZMA compression, which is only supported by the [https://admin.fedoraproject.org/updates/F11/FEDORA-2009-7986 rpm-4.7.1-1 update] (or later) for Fedora 11. Before upgrading from Fedora 11, run <code>yum update rpm</code>.
# shutdown -h now
* It is not possible to update directly from Fedora 10 or earlier with yum. To upgrade from Fedora 10, first update to Fedora 11, and then upgrade from Fedora 11 to Fedora 12. If you are using a release before Fedora 10, use one of the official upgrade methods or backup your data, perform a fresh installation, and restore from backup.
Failed to start poweroff.target: Connection timed out
* Upgrades from Fedora 11 might currently fail with missing dependencies (for example related to {{package|totem-gstreamer}} or {{package|PolicyKit-kde}}). The dependencies are ok, but Fedora 11 {{package|yum}} has problems resolving them ([[rhbug:519172|bug 519172]]).
Failed to open /dev/initctl: No such device or address
* If your root filesystem does not mount with 'defaults' options, you will need to add the root filesystem's mount options to grub.conf with the kernel flag <code>rootflags</code> - initramfs does not pick up the options the way initrd used to.  e.g. if you mount your root with the flags <code>data=journal,relatime</code> then you would add to the end of the 'kernel' line in grub.conf: <code>rootflags=data=journal,relatime</code> . After updating to dracut-004-4.fc12 or later, this kernel flag can be removed.
  Failed to talk to init daemon.


=== Upgrading from legacy end of life (EOL) Fedoras ===
=== Upgrading from legacy end of life (EOL) Fedoras ===
{{admon/note|Yum upgrading from older versions|Upgrading from older versions of Fedora is archived here: [[Upgrading from EOL Fedora using yum]]}}
{{admon/note|Yum upgrading from older versions|Upgrading from older versions of Fedora is archived here: [[Upgrading from EOL Fedora using yum]]}}


[[Category:FAQ]][[Category:How to]][[Category:Documentation]]
[[Category:FAQ]]
[[Category:How to]]
[[Category:Documentation]]

Revision as of 02:06, 3 September 2015

Warning.png
Although upgrades with yum do work, they are not explicitly tested as part of the release process by Fedora QA and are not documented in the Fedora installation guide. If you are not prepared to resolve issues on your own if things break, you should probably use the recommended installation methods instead.

This page contains information explaining how to upgrade Fedora using yum or dnf: in general the instructions apply equally to both tools, you may substitute one for the other at any point. dnf is the default tool for Fedora 22 and later, yum for Fedora 21 and earlier.

Upgrading Fedora using yum directly

When upgrading with yum you don't get any help from the recommended upgrade mechanisms, but with a typical system you might be able to upgrade systems remotely over ssh and with limited downtime. (You will still need to reboot to get the new kernel and system libraries/services running).

A live upgrade with yum usually works well with a typical installation and when following the advice below.

Participate

If you are upgrading using Yum and it shows any general dependency issues, please file them in Bugzilla. But please read this page, all references pages and search the mailing list archives before filing bugs. And of course, please help keep this page updated.

If you want to help make live upgrades work smoothly, join the Live Upgrade Special Interest Group.

Instructions to upgrade using yum

1. Backup your system

Backup any personal data to an external hard drive or to another machine. If there is some unrecoverable error that requires a fresh install, you don't want to lose any data.

2. Read about common problems

Further down in this page there is a list of common problems specific to yum upgrades for specific versions. Some of them require attention before the upgrade.

General advice on upgrading Fedora can be found on the Upgrading page. You should also read the Installation Guide and Release Notes for the version you plan to upgrade to - they contain important information regarding upgrading issues. Finally, check the list of Common bugs.

3. Clean Stuff

Review and remove all .rpmsave and .rpmnew files before and after upgrading. (And if you have selinux enabled then remember to check security context if you move config files around.)

Idea.png
Find unused config files
Merge and resolve the changes found by the following script: yum install rpmconf; rpmconf -a Now find and remove old config which nobody owns: find /etc /var -name '*?.rpm?*'

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

Idea.png
Find and review "unused" packages
You can find packages not required by other packages with the tool package-cleanup from the yum-utils package: yum install yum-utils; package-cleanup --leaves. 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. Remove them with yum remove package-name-and-version.
Another useful tool for cleaning up unused packages is rpmreaper. It's an ncurses application that lets you view rpm dependency graph and mark packages for deletion. Marking one package can make other packages leaf, which you can see immediately, so you don't have to run the tool several times to get rid of whole sub-tree of unused packages. Install with: yum install rpmreaper.
Idea.png
Find and review "lost" packages
You can find orphaned packages (ie packages not in the repositories anymore) with: package-cleanup --orphans. This will also show packages which have been partially uninstalled but where the "%postun" script failed.

4. Do the upgrade

If you have 3rd party repositories configured, you may need to adjust them for the new Fedora version. If you switch from one Fedora release to another there is often nothing that needs to be done. If you switch to Rawhide from a standard Fedora release (or vice versa) then most of the time you will need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).

Note that the upgrade is likely to fail if there are outdated dependencies from packages not backed by a yum repository or backed by a repository which isn't ready for the new version.

It is a good idea to do the upgrade outside the graphical environment. Log out of your graphical desktop and then

fedora-upgrade

A small script named fedora-upgrade is available which aims to automate the process outlined below. To run it, do the following

$ sudo yum install fedora-upgrade 
$ sudo fedora-upgrade

When performing upgrade via remote shell, it is good idea to use screen or tmux utility to be able to get back to running transaction in case your connection drops.

Alternatively, follow the manual steps:

Go to a text console

ctrl + alt + F2

(or)

log in as root, and go into multi-user.target

systemctl isolate multi-user.target

Update yum to latest version available in your Fedora version

# yum update yum

Install the new fedora gpg key for the version you are updating to

Keys you may find and verify at

https://fedoraproject.org/keys

or see a version specific update instructions at the bottom.

Clean the cache

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

# yum clean all

Upgrade all packages

Warning.png
Once a live upgrade is started, do not stop the upgrade by rebooting, killing the process, or by any other method until it is complete. Interrupting an upgrade will cause the affected system to be in a mixed state -- partially the old release and partially the new release. In this state, the system will not be reliable and will not operate as expected. You can try running yum distro-sync and package-cleanup --problems to try and fix the problems.
# yum --releasever=<release_number_you_want_to_sync_to> distro-sync
Warning.png
If you experience any dependency problems, you have to solve them manually. Most often it is enough to remove several problematic package(s). Be very careful when doing so however.

Note: While it is recommended to upgrade to intermediate releases if upgrading from an older release (for example upgrading from Fedora 19 to 20, then 20 to 21), depending on what version you are upgrading from, this step may fail with an error about GPG keys being in the wrong format. To overcome this, you can add the "--nogpgcheck" switch to the above yum distro-sync command.

5. Make sure Fedora is upgraded

Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well. Confirm with

 yum repolist 

after the upgrade process is over. 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 are installed with

# yum groupupdate 'Minimal Install'

You might want to update other groups too, see

# yum grouplist

For example

# yum groupupdate "GNOME Desktop" \
    "Development Tools" "Sound and Video" \
    "Games and Entertainment" "Administration Tools" \
    "Office/Productivity" "System Tools"

6. Preparing for reboot

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

/usr/sbin/grub2-install BOOTDEVICE

- where BOOTDEVICE is usually /dev/sda (If you get an error '/dev/sda does not have any corresponding BIOS drive' from that, then try /usr/sbin/grub2-install --recheck /dev/sda).

It might also be necessary to update the grub config file:

cp --backup=numbered -a /boot/grub2/grub.cfg{,.bak} # create backup copy
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg # update config file

Also, the order of init scripts could have changed from the previous version. A command to reset the order is:

cd /etc/rc.d/init.d; for f in *; do [ -x $f ] && /sbin/chkconfig $f resetpriorities; done

7. Cleanup your system

Again, cleanup your system as described in section 2. Also you might want to remove some cache files that are no longer used, for example files from older Fedora releases in the following directories:

  • /var/cache/yum
  • /var/cache/dnf
  • /var/cache/mock
  • /var/lib/mock

Version specific notes

From pre-release

If you are upgrading to a final release from an alpha, beta, preview, or other Rawhide release, please see Upgrading from pre-release to final.

To rawhide

Warning.png
Rawhide is the development branch of Fedora. It is meant to be used by developers and testers to provide feedback to the Fedora Project.

See the Rawhide release page for more information on Rawhide.

# dnf install dnf-plugins-core fedora-repos-rawhide
# dnf config-manager --set-disabled fedora updates updates-testing
# dnf config-manager --set-enabled rawhide
# dnf clean -q dbcache plugins metadata
# dnf --releasever=rawhide --setopt=deltarpm=false distro-sync --nogpgcheck

## Optional: it is generally advised to do a selinux autorelabel and reboot
# touch /.autorelabel


Fedora 22 -> Fedora 23

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-$(uname -i)
# dnf upgrade
# dnf clean all
# dnf --releasever=23 --setopt=deltarpm=false distro-sync --nogpgcheck

Fedora 21 -> Fedora 22

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-22-$(uname -i)
# yum update yum
# yum clean all
# yum --releasever=22 distro-sync

Fedora 20 -> Fedora 21

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-$(uname -i)
# yum update yum
# yum clean all
# yum --releasever=21 distro-sync

Fedora 21 split into different products. Execute one of those commands:

# yum install system-release-workstation
# yum install system-release-cloud
# yum install system-release-server

or this one if you want to have non-productized Fedora

# yum install system-release-nonproduct

If you change your mind, you can easily switch between products.

# yum swap system-release-cloud system-release-workstation

Swapping to workstation sometimes may require you to use yum shell as it may require multiple packages to be swapped.

Many people report (e.g. bugs 1035326, 1044184, 1002331) that after upgrade some files have incorrect SELinux context. It is recommend to run:

 # restorecon -R /

Appear to be enable to shutdown/reboot gracefully afterwards:

# shutdown -h now
Failed to start poweroff.target: Connection timed out
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.

Upgrading from legacy end of life (EOL) Fedoras

Note.png
Yum upgrading from older versions
Upgrading from older versions of Fedora is archived here: Upgrading from EOL Fedora using yum