The official stable release of Fedora Workstation 35 was made available for download on November 2, 2021, after being pushed back to resolve some outstanding bugs. You can now install or upgrade to Fedora 35 Desktop, Fedora cloud, Fedora Servers, or any spin or labs that come with any new release cycle.
If you prefer a fresh installation, you will have to download the latest ISO, create a bootable USB and perform a fresh install. I prefer an upgrade of the Fedora 34 system to Fedora 35. An upgrade will retain any existing files and all installed applications.
The article is a step-by-step guide on how to upgrade to Fedora 35 via GUI (GNOME software) and the CLI method.
Prerequisites
Before you begin your upgrade to Fedora 35, it is recommended you perform some housekeeping tasks and prerequisites.
- Backup important data and files: The first step before any system upgrade, regardless of the operating system, is to backup files. Make sure you’ve taken a backup of all essential files, directories, browser bookmarks, configuration settings, and many more.
- Ensure you have a stable Internet connection and an uninterrupted power supply.
- Make sure that there aren’t any jobs or scheduled backups currently running in your system.
- As a precaution, download the Fedora Workstation Live image in the unlikely event that something goes wrong.
- If you are not convinced to upgrade your system for some reason (unknown to the universe), read our article on the top new features of Fedora 35.
- Grab some coffee since an upgrade will take several minutes to complete.
Note that a Fedora system upgrade is only officially supported and tested over two releases at most. If you are running Fedora 34, you will want to upgrade to Fedora 35. However, in some instances, when you’re running an older release like 33, you may want to upgrade just to Fedora 34. If you need to upgrade over more releases, read more upgrade instructions from Fedora docs on upgrading in several smaller steps.
Perform an update of your existing Fedora 34 system
Before you get started, update your Fedora 34 system via GNOME software (GUI) or the command-line with the following steps:
$ sudo dnf --refresh update $ sudo dnf upgrade
Reboot your system to apply the updates:
$ sudo reboot
Upgrade to Fedora 35 using GNOME software (GUI)
Step 1: Open GNOME Software and click on the Updates section. It will display a notification that says – Fedora 35 Now Available. To proceed, click the Download button to download Fedora 35 packages and files for the system upgrade.
Step 2: The upgrade process will begin with the download of the required packages. It will take several minutes to complete depending on your Internet speed. It is safe to grab a cup of coffee at this time.
Step 3: Once the download is complete, click the Install button. It will display a new pop-up window that will prompt you to click Restart & Install upgrade. Click on it to continue the upgrade process.
Step 4: At this point, your Fedora system will reboot now. After which, it will download all the packages required to upgrade and install your system. It will take some time to complete. Please exercise some patience as you grab a snack or coffee.
Step 5: If your Fedora system upgrade is successful, you will see that the system is up-to-date under the Updates section in GNOME Software.
Step 6: Check the installed Fedora version from the command-line using the following command:
######@fedora ~]$ cat /etc/fedora-release Fedora release 35 (Thirty Five)
You can also verify your installed Fedora version under Settings -> About section.
Upgrade to Fedora 35 using the command-line
If you are more comfortable using the terminal, follow these simple steps to perform an upgrade to Fedora 35:
Step 1: Update your existing Fedora release from the command line
$ sudo dnf --refresh update $ sudo dnf upgrade
Reboot your system to apply the updates.
$ sudo reboot
Step 2: Install the dnf-plugin-system-upgrade package using the following command.
$ sudo dnf install dnf-plugin-system-upgrade
Step 3: Download the updated Fedora 35 packages using the following command
$ sudo dnf system-upgrade download --releasever=35
The command should take several minutes to complete all the required packages. You can snack at this point as you watch your system display a summary of packages to replace, update, upgrade, or downgrade.
You can also change the –releasever= number to upgrade to a different release version. For example, you can use =36 to upgrade to a Branched release, or =rawhide to upgrade to Rawhide. Note that neither of these two (36 or rawhide) is a stable release.
$ sudo dnf system-upgrade download --releasever=36 $ sudo dnf system-upgrade download --releasever=rawhide
Step 4: In some cases, your Fedora upgrade will run into some trouble and won’t continue if your packages have unsatisfied dependencies. In such a scenario, you will have to run the dnf system-upgrade download –releasever=35 command again with an extra –allowerasing option.
$ sudo dnf system-upgrade download –releasever=35 --allowerasing
Step 5: Once all package downloads are complete, run the following command to trigger the upgrade process.
$ sudo dnf system-upgrade reboot
Note that the command will reboot your machine immediately without any countdown or confirmation.
Step 6: If your upgrade process is successful, your system will reboot a second time into the updated release version of Fedora 35.
Optional: Post-upgrade instructions
If you are an experienced Linux terminal user, then this section is for you. For any general user, you can skip these steps. Note that your Fedora system will still function normally.
Update system configuration files
If you have changed the package’s configuration files, RPM creates new files with either .rpmnew or .rpmsave. You can search to update these files or use the rpmconf tool that makes it straightforward.
Install rpmconf with the following command:
$ sudo dnf install rpmconf
Update config files with the following command:
$ sudo rpmconf -a
Change hostname
You can change the hostname of your upgraded Fedora to match the name of your choice.
$ sudo hostnamectl set-hostname fedora35fedora
Upgrade package configurations
During an upgrade with rpmconf, some configuration files may change. After any Fedora upgrade, you should verify whether /etc/ssh/sshd_config, /etc/ntp.conf, /etc/nsswitch.conf are expected.
Clean dnf metadata cache
You can clear cached dnf metadata using the following commands:
$ sudo dnf system-upgrade clean $ sudo dnf clean packages
Clean-up old packages
You can list any broken dependencies, duplicate packages, or extra packages before you decide to remove them altogether.
List packages with broken dependencies:
$ sudo dnf update $ sudo dnf repoquery --unsatisfied
List duplicate packages:
$ sudo dnf repoquery --duplicates
List packages that are not in the official Fedora repository.
$ sudo dnf list extras
If you do not need any of these packages, you can remove them with the following commands:
$ sudo dnf remove $(sudo dnf repoquery --extras --exclude=kernel,kernel-\*) $ sudo dnf autoremove
Note that the dnf autoremove command will not remove any unused kernels.
Clean-up old Linux Kernels
If you want to remove old kernels, you can use the following command:
$ sudo dnf remove $(dnf repoquery --installonly --latest-limit=-2)
The command above will remove all old kernels and retain only the latest 2 Kernels.
You can also use the following script that will retain only the latest kernel.
#!/usr/bin/env bash old_kernels=($(dnf repoquery --installonly --latest-limit=-1 -q)) if [ "${#old_kernels[@]}" -eq 0 ]; then echo "No old Fedora kernels found" exit 0 fi if ! dnf remove "${old_kernels[@]}"; then echo "Failed to remove old Fedora kernels" exit 1 fi echo "Removed old Fedora kernels" exit 0
Note that the script above works whenever Fedora updates a kernel.
Clean-up old symlinks
You can clean or delete any dangling links after an upgrade by first installing the symlinks utility.
$ sudo dnf install symlinks
Search and audit for broken symlinks with the following command:
$ sudo symlinks -r /usr | grep dangling
Delete any broken symlinks with the -d flag option:
$ sudo symlinks -r -d /usr
Resolve Fedora upgrade issues
In some cases, you might run into problems with your Fedora upgrade.
Rebuild your RPM database
RPM or DNF warnings might arise when your database is corrupt. To rebuild your database, always backup /var/lib/rpm/ first.
Rebuild the database with the following command:
$ sudo rpm --rebuilddb
Resolve dependency issues with distro-sync
If your system is upgraded partly or you face package dependency issues, try running another distro-sync manually to try to fix the problem with the following command:
$ sudo dnf distro-sync
Moreover, you can also use the –allowerasing option to remove packages with unsatisfied dependencies.
$ sudo dnf distro-sync --allowerasing
Relabel files with the latest SELinux policy
Some SELinux policy warnings can be annoying. It usually happens if you had disabled SELinux at some point or because some files have incorrect SELinux permissions. To solve these issues, you may have to relabel SELinux on your system with the following command.
$ sudo fixfiles -B onboot
Wrapping up
In this guide, we have learned how to upgrade to Fedora 35. You can follow the straightforward steps with either GNOME software (GUI) or the command line.
Congratulations! You successfully upgraded to Fedora 35. You can now enjoy your Fedora 35 Workstation or server edition with the latest features, GNOME 41, developer tools, performance, and stability improvements as you would expect which each new stable release.
1 comment
Nice read