Upgrading Fedora from the CLI

  1. Make sure the system is fully up to date: dnf --refresh upgrade
  2. Download the updated packages: dnf system-upgrade download --refresh --releasever=$(source /etc/os-release && printf $((VERSION_ID+1))) 1
  3. Trigger the upgrade process (will immediately reboot the system): dnf offline reboot

For more details, see https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

Post-upgrade

  1. Go through the release notes: https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/
  2. Remove retired packages, which no longer receive any updates: remove-retired-packages
  3. List packages that are installed on the system but no longer available in repositories. Consider removing them: dnf list --extras

For more details, see https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/#sect-optional-post-upgrade-tasks


  1. This one-liner automatically determines the right version to upgrade to based on the running system’s current version. If you don’t like it, you could also look up the current version to pass to --releasever by hand. ↩︎