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 checkDownload the packages for the next Fedora release:
export FEDORA_RELEASE_VER=43
sudo dnf system-upgrade download --releasever="${FEDORA_RELEASE_VER}" --allowerasingReboot to begin the offline upgrade:
sudo dnf system-upgrade rebootPost-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 -aIf 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/sdaRemove packages that have been retired and are no longer included in the new Fedora release:
sudo dnf install remove-retired-packages
remove-retired-packagesIdentify 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 autoremoveClean up dangling symlinks
Find and remove broken symbolic links left behind after the upgrade:
sudo dnf install symlinks
sudo symlinks -r -d /usrRebuild the RPM database
If DNF or RPM reports database corruption or package metadata errors after the upgrade, rebuild the RPM database:
sudo rpm --rebuilddbRelabel SELinux files
If you encounter SELinux permission issues after upgrading, schedule a full filesystem relabel on the next boot:
sudo fixfiles -B onboot