Skip to content

OS Upgrade

Official Fedora Upgrade Instructions

Fedora upgrades every ~6 months to a new major version, i.e. 42 -> 43. On modern Fedora systems using DNF5, the system-upgrade command is built into DNF and is used to perform offline major version upgrades. This guide goes through the process step-by-step and details post-upgrade system cleanup.

Upgrade system

First, refresh all repositories and upgrade all software:

sudo dnf update --refresh
sudo dnf upgrade --refresh
sudo dnf check

Download the packages for the next Fedora release:

export FEDORA_RELEASE_VER=43
sudo dnf system-upgrade download --releasever="${FEDORA_RELEASE_VER}" --allowerasing

Reboot to begin the offline upgrade:

sudo dnf system-upgrade reboot

Post-upgrade cleanup

Review any configuration files that were replaced during the upgrade and merge any changes you want to keep.

sudo dnf install rpmconf
sudo rpmconf -a

If your system uses legacy BIOS (not UEFI), reinstall GRUB to ensure the bootloader is up to date. Verify that /dev/sda is actually your boot drive first (e.g. sudo mount | grep "/boot ").

sudo grub2-install /dev/sda

Remove packages that have been retired and are no longer included in the new Fedora release:

sudo dnf install remove-retired-packages
remove-retired-packages

Identify and remove unnecessary packages

List packages that are no longer required, identify duplicate package versions, remove duplicates, and uninstall unused dependencies:

sudo dnf repoquery --unneeded
sudo dnf repoquery --duplicates
sudo dnf remove --duplicates
sudo dnf autoremove

Clean up dangling symlinks

Find and remove broken symbolic links left behind after the upgrade:

sudo dnf install symlinks
sudo symlinks -r -d /usr

Rebuild the RPM database

If DNF or RPM reports database corruption or package metadata errors after the upgrade, rebuild the RPM database:

sudo rpm --rebuilddb

Relabel SELinux files

If you encounter SELinux permission issues after upgrading, schedule a full filesystem relabel on the next boot:

sudo fixfiles -B onboot
Last updated on