The Fedora Linux project this week released their latest incarnation: Fedora Linux 39.
The built-in package manager, dnf, makes upgrades from another current release super-easy on the Server and Cloud variants, so you can upgrade Fedora Linux 37 to Fedora Linux 39 or upgrade Fedora Linux 38 to Fedora Linux 39 with a few commands that I'll go through in this article.
Unless otherwise specified, commands shown below should be run as root. To get to root if you are not already, type su and enter the root password, or sudo -i and enter your own password if prompted.
Step 1: ensure your current system is up-to-date
Before upgrading, make sure your current system is up-to-date with all packages.
dnf --refresh upgrade
The command will display a summary of updates you need (if any.) Answer "y" to the prompt if any updates are required.
[root@fedora-39-upgrade-test ~]# dnf --refresh upgrade Fedora 38 - x86_64 50 kB/s | 26 kB 00:00 Fedora 38 openh264 (From Cisco) - x86_64 3.4 kB/s | 989 B 00:00 Fedora Modular 38 - x86_64 83 kB/s | 26 kB 00:00 Fedora 38 - x86_64 - Updates 49 kB/s | 23 kB 00:00 Fedora Modular 38 - x86_64 - Updates 52 kB/s | 25 kB 00:00 Dependencies resolved. ================================================================================================================================================================ Package Architecture Version Repository Size ================================================================================================================================================================ Installing: kernel-core x86_64 6.5.10-200.fc38 updates 16 M ... Transaction Summary ================================================================================================================================================================ Install 9 Packages Upgrade 183 Packages Total download size: 181 M Is this ok [y/N]: y
If any updates were installed, it would be wise to reboot.
Step 2: Download Fedora Linux 39
After rebooting, you can now instruct your system to download Fedora Linux 39 ready to upgrade your Fedora Linux 38 to Fedora Linux 39:
dnf system-upgrade download --releasever=39
Answer "y" to the prompt asking if you wish to continue (we have just updated the system in step 1.)
[root@fedora-39-upgrade-test ~]# dnf system-upgrade download --releasever=39 Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Fedora will display a summary of what packages are going to be installed, upgraded or removed, as well as the size of the download. Answer "y" again to continue.
Transaction Summary ================================================================================================================================================================ Install 20 Packages Upgrade 438 Packages Downgrade 3 Packages Total download size: 244 M DNF will only download packages, install gpg keys, and check the transaction. Is this ok [y/N]: y
Answer "y" to any prompts to accept GPG keys:
Fedora 39 - x86_64 1.6 MB/s | 1.6 kB 00:00 Importing GPG key 0x18B8E74C: Userid : "Fedora (39) " Fingerprint: E8F2 3996 F232 1864 0CB4 4CBE 75CF 5AC4 18B8 E74C From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-39-x86_64 Is this ok [y/N]: y
This operation could take several minutes to complete, depending on the speed of your internet connection and load on the Fedora update mirrors.
When the update has completed, you will be given some suggested next steps:
Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Complete! Transaction saved to /var/lib/dnf/system-upgrade/system-upgrade-transaction.json. Download complete! Use 'dnf system-upgrade reboot' to start the upgrade. To remove cached metadata and transaction use 'dnf system-upgrade clean' The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'.
Step 3: Upgrade to the new release
The next step we are going to do is reboot to apply the upgrade:
dnf system-upgrade reboot
If you are connecting to your system over SSH, your SSH session will be terminated. You can follow the upgrade's progress on the machine's console, if you have access to it.
After several minutes and another reboot later, you should be able to connect back into your new Fedora 39 machine:
[root@fedora-39-upgrade-test ~]# uname -a Linux fedora-39-upgrade-test 6.5.11-300.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 8 22:37:57 UTC 2023 x86_64 GNU/Linux
Finally, it can't hurt to clean up afterwards:
[root@fedora-39-upgrade-test ~]# dnf system-upgrade clean Cleaning up downloaded data... [root@fedora-39-upgrade-test ~]# dnf clean packages 0 files removed
Step 4: Enjoy
Enjoy your newly upgraded Fedora Linux 39 system!