From Fedora Project Wiki

mNo edit summary
(→‎Install the package signing key for the release you are upgrading to: Restore information on where keys live on the system)
(42 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{autolang|base=yes}}
{{autolang|base=yes}}


{{admon/warning|Although upgrades with yum or dnf (directly, not via the DNF system upgrade plugin) 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.}}
{{admon/warning| This page is refers to unofficial method of upgradingRefer to [[Upgrading]] page on the current official methods to upgrade Fedora.}}


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. [[Dnf]] is the default tool for Fedora 22 and later, [[Yum]] for Fedora 21 and earlier.
This page contains information explaining how to upgrade Fedora online using {{command|dnf}} (without the DNF system upgrade plugin).


== Upgrading Fedora using yum or dnf directly ==
== Upgrading Fedora using dnf directly ==


When upgrading with yum or dnf 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).
== Participate ==


A live upgrade with [[yum]] or [[dnf]] usually works well with a typical installation and when following the advice below.
If you are upgrading using [[Dnf]] 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.


== Participate ==
If you want to help make live upgrades work smoothly, join the [[SIGs/LiveUpgrade | Live Upgrade Special Interest Group]].


If you are upgrading using [[Yum]] or [[Dnf]] 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.
== Upgrading across multiple releases ==


If you want to help make live upgrades work smoothly, join the [[SIGs/LiveUpgrade | Live Upgrade Special Interest Group]].
If you need to upgrade across several releases, it is generally recommended to go one release at a time: for example, rather than going directly from {{FedoraVersion|long|previous}} to {{FedoraVersion|long|next}}, first go to {{FedoraVersion|long}} and then from there to {{FedoraVersion|long|next}}. This tends to reduce the number of package dependency issues you may encounter. If you are upgrading from an [[End of life]] release, please also see [[#eol|the end-of-life section]].


== Instructions to upgrade using yum or dnf==
== Instructions to upgrade using dnf ==


=== 1.  Backup your system ===
=== 1.  Backup your system ===
Line 25: Line 25:
=== 2. Read about common problems ===
=== 2. Read about common problems ===


Further down in this page there is a list of common problems specific to yum or dnf upgrades 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 dnf 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 33: Line 33:
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.)
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.)


{{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>dnf 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>rpmconf -c</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.


{{admon/tip|Find and review "unused" packages| You can find packages not required by other packages with the tool <code>package-cleanup</code> from the <code>yum-utils</code> package: <code>yum install yum-utils; package-cleanup --leaves</code>. 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 <code>yum remove package-name-and-version</code>.<br/>
{{admon/tip|Find and review "unused" packages| You can find packages not required by other packages with the tool <code>package-cleanup</code> from the <code>yum-utils</code> package: <code>dnf install yum-utils; package-cleanup --leaves</code>. 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 <code>dnf remove package-name-and-version</code>.<br/>
Another useful tool for cleaning up unused packages is <code>rpmreaper</code>.  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: <code>yum install rpmreaper</code>.
Another useful tool for cleaning up unused packages is <code>rpmreaper</code>.  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: <code>dnf install rpmreaper</code>.
}}
}}


Line 48: Line 48:
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).
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.
Note that the upgrade is likely to fail if there are outdated dependencies from packages not backed by a dnf 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
It is a good idea to do the upgrade outside the graphical environment. Log out of your graphical desktop and then
Line 56: Line 56:
A small script named fedora-upgrade is available which aims to automate the process outlined below. To run it, do the following
A small script named fedora-upgrade is available which aims to automate the process outlined below. To run it, do the following


<pre>$ sudo yum install fedora-upgrade  
<pre>$ sudo dnf install fedora-upgrade  
$ sudo fedora-upgrade
$ sudo fedora-upgrade
</pre>
</pre>
Line 78: Line 78:
</pre>
</pre>


==== Update yum to latest version available in your Fedora version ====
==== Fully update your current Fedora install ====


<pre>
<pre>
# yum update yum
# dnf upgrade
</pre>
</pre>


==== Install the new fedora gpg key for the version you are updating to ====
{{anchor|packagekey}}
==== Install the package signing key for the release you are upgrading to ====


Keys you may find and verify  at
If you are upgrading across two releases or fewer from Fedora 20 or later, this step should be unnecessary. If you are upgrading from an older Fedora or upgrading across three or more releases, you may need to import the signing key for the target release.


https://fedoraproject.org/keys
If it turns out not to be, you should be able to import keys like so:
<pre>
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-x86_64
</pre>
, replacing "23" and "x86_64" with the new Fedora version and your architecture, respectively.


or see a version specific update instructions at the bottom.
You can also find package signing keys for currently-supported releases [https://getfedora.org/keys/ here]. Keys for EOL releases can be found [https://getfedora.org/keys/obsolete.html here]. Click ''Primary'' (or ''Secondary'', if you are using a secondary architecture), and you will see ''Get it from: Fedora Project'', where ''Fedora Project'' is a link. Copy that URL, and run:
<pre>
# rpm --import (url)
</pre>
to install the key. On old releases, {{command|rpm}} may have trouble doing this; if that happens, download the file with {{command|curl -o}} or {{command|wget}} and import the downloaded file.


==== Clean the cache ====
==== Clean the cache ====


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


<pre>
<pre>
# yum clean all
# dnf clean all
</pre>
</pre>


==== Upgrade all packages ====
==== 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. }}
{{admon/warning|Never upgrade on battery power|Never run the upgrade operation on battery power! Always connect to the mains, if using a laptop. However, if your system does have a battery, it's a good idea to ensure it's charged and connected in case of a power outage during the upgrade.}}
 
{{admon/warning|Do not interrupt an upgrade for any reason|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 {{command|dnf distro-sync}} and {{command|package-cleanup --problems}} to try and fix the problems.}}
 
Run the upgrade command:


<pre>
<pre>
# yum --releasever=<release_number_you_want_to_sync_to> distro-sync
# dnf --releasever=<target_release_number> --setopt=deltarpm=false distro-sync
</pre>
</pre>


{{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.
{{admon/note|Dependency issues|If you experience any dependency problems, you have to solve them manually. These are often caused by packages being retired in the newer release, but not properly obsoleted. Often it is enough to remove several problematic package(s).
}}
 
You may find that a package you care about depends on a package that must be removed for the upgrade to proceed. Usually you will be able to reinstall the important package once the upgrade is complete.
 
If it seems like you must remove a package with many dependencies, especially ones that look important, please be careful. If you are attempting to upgrade across multiple releases, try a smaller jump to see if that avoids the problem.


'''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.
If you are at all unsure in any way, ask for help on a mailing list, forum or IRC before removing packages.}}


=== 5. Make sure Fedora is upgraded ===
=== 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.   
Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well.  Confirm with {{command|dnf repolist}} after the upgrade process is over.  <code>dnf</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 'Minimal Install'
# dnf groupupdate 'Minimal Install'
</pre>
</pre>


Line 126: Line 142:


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


Line 132: Line 148:


<pre>
<pre>
# yum groupupdate "GNOME Desktop" \
# dnf groupupdate "GNOME Desktop" \
     "Development Tools" "Sound and Video" \
     "Development Tools" "Sound and Video" \
     "Games and Entertainment" "Administration Tools" \
     "Games and Entertainment" "Administration Tools" \
Line 141: Line 157:


{{Anchor|bootloader}}
{{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>
/usr/sbin/grub2-install BOOTDEVICE
/usr/sbin/grub2-install BOOTDEVICE
</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>/usr/sbin/grub2-install --recheck /dev/sda</tt>).
- where BOOTDEVICE is often {{code|/dev/sda}}, or {{code|/dev/vda}} for some virtual machine installs. If you have more than one hard disk, make sure you use the correct device!
 
If you get an error (e.g. {{code|/dev/sda does not have any corresponding BIOS drive}}) from that, then try {{command|/usr/sbin/grub2-install --recheck BOOTDEVICE}}).


It might also be necessary to update the grub config file:
It might also be necessary to update the grub config file:
Line 152: Line 169:
cp --backup=numbered -a /boot/grub2/grub.cfg{,.bak} # create backup copy
cp --backup=numbered -a /boot/grub2/grub.cfg{,.bak} # create backup copy
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg # update config file
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg # update config file
</pre>
Also, the order of init scripts could have changed from the previous version. A command to reset the order is:
<pre>
cd /etc/rc.d/init.d; for f in *; do [ -x $f ] && /sbin/chkconfig $f resetpriorities; done
</pre>
</pre>


Line 162: Line 174:
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:
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/dnf</nowiki>
* <nowiki>/var/cache/mock</nowiki>
* <nowiki>/var/cache/mock</nowiki>
* <nowiki>/var/lib/mock</nowiki>
* <nowiki>/var/lib/mock</nowiki>


== Version specific notes ==
== Release specific notes ==
 
Note: the release-specific notes for [[End of life]] releases are on the [[Upgrading from EOL Fedora using package manager|EOL packager manager upgrade page]].


=== From pre-release ===
=== From pre-release ===


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, or release candidate, please see [[Upgrading from pre-release to final]].


{{Anchor|Rawhide}}
{{Anchor|Rawhide}}
=== To 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.}}
{{admon/warning|Rawhide is unstable|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.  
See the [[Releases/Rawhide|Rawhide]] release page for more information on Rawhide.  


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


Line 191: Line 205:
</pre>
</pre>


{{Anchor|24-25}}
{{Anchor|25}}
=== Fedora 25 ===


{{Anchor|20-21}}
No special instructions. Follow the above instructions.
 
=== 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 {{command|yum shell}} as it may require multiple packages to be swapped.
{{Anchor|23-24}}
{{Anchor|24}}
=== Fedora 24 ===


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


  # restorecon -R /
{{anchor|eol}}
=== Upgrading from legacy end of life (EOL) Fedora releases ===


Appear to be enable to shutdown/reboot gracefully afterwards:
Note that Fedora strongly recommends against ever running an end-of-life release on any production system, or any system connected to the public internet, in any circumstances. You should never allow a production Fedora deployment to reach end-of-life in the first place.


# shutdown -h now
With that in mind, if you do have an end-of-life release installed on a system you cannot just discard or re-deploy, you can attempt to upgrade it, though this is a less-tested and less-supported operation.
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 ===
For detailed instructions on upgrades from EOL releases, please read [[Upgrading from EOL Fedora using package manager]].
{{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:FAQ]]
[[Category:How to]]
[[Category:How to]]
[[Category:Documentation]]
[[Category:Documentation]]

Revision as of 21:03, 20 December 2016

Warning.png
This page is refers to unofficial method of upgrading. Refer to Upgrading page on the current official methods to upgrade Fedora.

This page contains information explaining how to upgrade Fedora online using dnf (without the DNF system upgrade plugin).

Upgrading Fedora using dnf directly

Participate

If you are upgrading using Dnf 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.

Upgrading across multiple releases

If you need to upgrade across several releases, it is generally recommended to go one release at a time: for example, rather than going directly from Fedora 38 to Fedora 40, first go to Fedora 39 and then from there to Fedora 40. This tends to reduce the number of package dependency issues you may encounter. If you are upgrading from an End of life release, please also see the end-of-life section.

Instructions to upgrade using dnf

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 dnf 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: dnf install rpmconf; rpmconf -a Now find and remove old config which nobody owns: rpmconf -c

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: dnf 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 dnf 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: dnf 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 dnf 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 dnf 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

Fully update your current Fedora install

# dnf upgrade

Install the package signing key for the release you are upgrading to

If you are upgrading across two releases or fewer from Fedora 20 or later, this step should be unnecessary. If you are upgrading from an older Fedora or upgrading across three or more releases, you may need to import the signing key for the target release.

If it turns out not to be, you should be able to import keys like so:

 # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-x86_64

, replacing "23" and "x86_64" with the new Fedora version and your architecture, respectively.

You can also find package signing keys for currently-supported releases here. Keys for EOL releases can be found here. Click Primary (or Secondary, if you are using a secondary architecture), and you will see Get it from: Fedora Project, where Fedora Project is a link. Copy that URL, and run:

 # rpm --import (url)

to install the key. On old releases, rpm may have trouble doing this; if that happens, download the file with curl -o or wget and import the downloaded file.

Clean the cache

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

# dnf clean all

Upgrade all packages

Warning.png
Never upgrade on battery power
Never run the upgrade operation on battery power! Always connect to the mains, if using a laptop. However, if your system does have a battery, it's a good idea to ensure it's charged and connected in case of a power outage during the upgrade.
Warning.png
Do not interrupt an upgrade for any reason
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 dnf distro-sync and package-cleanup --problems to try and fix the problems.

Run the upgrade command:

# dnf --releasever=<target_release_number> --setopt=deltarpm=false distro-sync
Note.png
Dependency issues
If you experience any dependency problems, you have to solve them manually. These are often caused by packages being retired in the newer release, but not properly obsoleted. Often it is enough to remove several problematic package(s).

You may find that a package you care about depends on a package that must be removed for the upgrade to proceed. Usually you will be able to reinstall the important package once the upgrade is complete.

If it seems like you must remove a package with many dependencies, especially ones that look important, please be careful. If you are attempting to upgrade across multiple releases, try a smaller jump to see if that avoids the problem.

If you are at all unsure in any way, ask for help on a mailing list, forum or IRC before removing packages.

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 dnf repolist after the upgrade process is over. dnf 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

# dnf groupupdate 'Minimal Install'

You might want to update other groups too, see

# dnf grouplist

For example

# dnf 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 often /dev/sda, or /dev/vda for some virtual machine installs. If you have more than one hard disk, make sure you use the correct device!

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

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

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/dnf
  • /var/cache/mock
  • /var/lib/mock

Release specific notes

Note: the release-specific notes for End of life releases are on the EOL packager manager upgrade page.

From pre-release

If you are upgrading to a final release from an Alpha, Beta, or release candidate, please see Upgrading from pre-release to final.

To Rawhide

Warning.png
Rawhide is unstable
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 upgrade
# 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 packages 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 25

No special instructions. Follow the above instructions.

Fedora 24

No special instructions. Follow the above instructions.

Upgrading from legacy end of life (EOL) Fedora releases

Note that Fedora strongly recommends against ever running an end-of-life release on any production system, or any system connected to the public internet, in any circumstances. You should never allow a production Fedora deployment to reach end-of-life in the first place.

With that in mind, if you do have an end-of-life release installed on a system you cannot just discard or re-deploy, you can attempt to upgrade it, though this is a less-tested and less-supported operation.

For detailed instructions on upgrades from EOL releases, please read Upgrading from EOL Fedora using package manager.