How to upgrade Fedora in place from the Command Line

For this example I’m using Fedora 33, and will describe how to upgrade to 34. In-place upgrades work as far as two versions back, anything further will require intermediate steps. Update all packages for the current version before you start, then restart the system to make sure you’re on the latest kernel.

Prerequisite: we need the system upgrade plugin for this process. We only need to do this once, and it will remain in place and update itself for future system upgrades. Here’s how to install it:

dnf install dnf-plugin-system-upgrade

Next we’ll refresh the whole system before the upgrade process can begin.

dnf --refresh upgrade

This step will also be recommended before you execute the next step, which will download all necessary packages that are needed for the upgrade. It’ll be quite large, just under 2GB. Hit Y to continue when prompted.

dnf system-upgrade download --refresh --releasever=34

Replace the number after –releasever= with the version you intend to upgrade to. You’ll receive an error if the upgrade is not possible. Downloaded packages will remain in cache and can be updated if you’re not ready to perform the update immedicable. If you ever want to clear the cache out, dnf system-upgrade clean will do the trick.

Now comes the actual upgrade process:

dnf system-upgrade reboot

This will disconnect your remote connection and restart the system, initiating the upgrade process. You can watch on the local terminal. This will take some time. If all goes well you’ll be able to re-connect within 15-20 minutes.

Jay is founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or drawing on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

You can leave a comment on my original post.