Community Tutorials Fedora How to Upgrade Fedora to the Next Release
How to Upgrade Fedora to the Next Release
FEDORA

How to Upgrade Fedora to the Next Release

SKYLINE Knowledge Base
Photo by Chris Ried on Unsplash

A field-tested, step-by-step guide. How to Upgrade Fedora to the Next Release — prerequisites, the actual commands, verification, and links to related Fedora topics.

Fedora ships a new release every six months and supports each release for thirteen months. To avoid running out of security updates, you upgrade. The blessed path is dnf system-upgrade.

Prerequisites

  • Fedora N (e.g. 39) → upgrading to N+1 (e.g. 40) or N+2.
  • All current updates applied (sudo dnf upgrade --refresh -y).
  • An out-of-band console for headless servers. The upgrade reboots into a new initrd.

Step 1: Apply current updates first

sudo dnf upgrade --refresh -y
sudo dnf autoremove -y
sudo dnf clean all
sudo systemctl reboot          # if the kernel changed

A clean N-with-all-updates is the safest starting state.

Step 2: Install the upgrade plugin

sudo dnf install -y dnf-plugin-system-upgrade

(On Fedora 41+ it is dnf5-plugin-system-upgrade.)

Step 3: Download the next release

sudo dnf system-upgrade download --releasever=40

--releasever is the version number of where you are going. Resolve any conflicts the prompt mentions (third-party repos are the usual culprit — RPM Fusion, NodeSource, Docker, etc. need the matching repo for the new release).

The download phase does NOT reboot. You can cancel cleanly with:

sudo dnf system-upgrade clean

Step 4: Reboot into the upgrade

sudo dnf system-upgrade reboot

The host reboots into a special target where DNF replaces every installed package. Headless servers must be on a console (IPMI, hypervisor) — the upgrade runs in plymouth/text. Expect 10–30 minutes depending on package count.

When it finishes, it reboots again into the new release.

Step 5: Post-upgrade housekeeping

cat /etc/fedora-release
sudo dnf autoremove -y
sudo dnf system-upgrade clean
sudo rpmconf -a                       # reconcile .rpmnew / .rpmsave files

rpmconf (from package rpmconf) walks you through each config file that ships a new version, so you can keep your local edits or accept upstream's new defaults.

Step 6: Re-enable held repos

Third-party repos are commonly disabled during the upgrade. Re-enable them:

ls /etc/yum.repos.d/
sudo dnf repolist --disabled | head
sudo dnf config-manager --enable rpmfusion-free-updates

Verify

cat /etc/os-release
uname -r
sudo dnf check
sudo dnf list --upgrades

Conclusion

dnf system-upgrade is the only correct path between Fedora releases. Skip a release if you must (N → N+2 works), but never skip more than that — the package conflict matrix gets unkind.

Next steps

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Fedora for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.