With the official release of Fedora 42 just a few minutes away, many users are eager to upgrade their systems to experience the latest features, including the new KDE Plasma Desktop Edition, COSMIC desktop environment, and improved Anaconda installer. This comprehensive guide will walk you through both GUI and CLI methods to safely upgrade your Fedora 41 system to Fedora 42.
Table of Contents
Prerequisites (For Both Methods)
1. Backup your data:
This is very important step. Before upgrading to Fedora 42, use backup tools like Deja Dup, Timeshift, or rsync to backup your home and config files.
2. Ensure a stable power source:
Use a UPS if needed.
3. Have a reliable internet connection:
The upgrade downloads several GBs, A poor connection can interrupt downloads and corrupt the upgrade.
4. Check third-party repos:
It is best to temporarily disable them if not yet updated for Fedora 42.
5. Make sure your system is fully updated:
sudo dnf upgrade --refresh sudo reboot
Check your current Fedora version:
cat /etc/fedora-release
Or,
cat /etc/os-release
You can also do it by navigating to Settings -> System -> About.
Fedora Upgrade Limitations
Fedora has a clear and strict upgrade policy to help users avoid unsupported paths that may break the system.
Here's what you should know about Fedora Upgrade Limitations before attempting any release upgrade.
1. Only Two Releases at Most
You can upgrade across:
- One release: Fedora 41 → 42 (recommended)
- Two releases: Fedora 40 → 42 (supported, but more complex)
Upgrades across more than two releases are not supported (e.g., Fedora 39 → 42 in one step is not safe).
2. End-of-Life (EOL) Releases are Risky
Fedora declares each release End of Life (EOL) approximately one month after N+2 is released.
If you're on an EOL release:
- You won't receive security updates.
- DNF may not find working repositories.
- Upgrade paths may fail due to missing metadata or keys.
Upgrading from EOL releases requires stepping through releases one-by-one.
3. Rawhide and Branched Releases are for Testing
You can upgrade to:
--releasever=rawhide
→ Rolling development tree--releasever=43
(during Beta) → Branched test release
These are not stable, may break frequently, and are meant for testers and contributors only.
4. Third-Party Repositories May Lag Behind
Some repositories (like RPM Fusion, proprietary drivers, or COPR repos) may not support Fedora 42 right away.
During upgrade:
- Use
--allowerasing
to resolve dependency issues if needed. - Temporarily disable third-party
.repo
files to prevent failures.
5. Cross-Edition or Variant Upgrades are Tricky
Switching editions (e.g., Workstation → Server, or Silverblue → KDE) during upgrade is not officially supported via dnf system-upgrade
.
Stick to your current variant. To switch editions, do a clean install.
Table: Fedora Upgrade Policy
Upgrade Path | Supported? | Notes |
---|---|---|
41 → 42 | ✅ | Fully supported |
40 → 42 | ✅ | Supported, more caution advised |
39 → 42 | ❌ | Not supported, must go via 40 |
EOL Release → Stable | ⚠️ | Risky, may require intermediate steps |
Stable → Rawhide | ⚠️ | Supported, but for testers only |
Edition Swap via DNF | ❌ | Not supported |
Hope you understand. Now let us see how to upgrade to Fedora Linux 42.
As stated already, we can do this from GUI or CLI. First, we will see the GUI method.
Method 1: Upgrade Fedora 41 to 42 Using GUI (GNOME Software)
This is the easiest and safest way for desktop users.
Save your work and close any opened applications.
1. Open GNOME Software
First, launch Fedora’s software management tool.
To do so, press Super
key, type Software, and open the Software application.
2. Go to the "Updates" Tab
In the Gnome Software application, click Updates tab.
If Fedora 42 is available, you'll see a banner like:
"Fedora Linux 42 Available"
3. Click "Download"
This starts downloading all the upgrade packages in the background.
4. Restart & Install
Once downloaded, click Restart & Upgrade.
The system will reboot and perform the upgrade in an offline mode.
5. Post-Upgrade
Log in once the system reboots into Fedora 42.
Run the following command to verify if the Fedora 42 upgrade is successful:
cat /etc/fedora-release
Sample Output:
Fedora release 42 (Adams)
You can also check the Fedora version from Settings -> System -> About.
Method 2: Upgrade to Fedora 42 via CLI (Command Line)
This method uses the dnf system-upgrade
plugin. It works on both Workstation and Server editions.
Step 1: Install the DNF System Upgrade Plugin
sudo dnf install dnf-plugin-system-upgrade
This is only required if you still use DNF4 for any reason. Fedora 41 has already included DNF5, so you don't have to install it.
Step 2: Refresh and Update the System
sudo dnf upgrade --refresh sudo reboot
Step 3: Download Fedora 42 Packages
sudo dnf system-upgrade download --releasever=42
This will start downloading all latest Fedora Linux version 42 packages.
If you encounter any dependency issues, you can use one of the following (or both) flags.
Optional Flags:
- Use
--allowerasing
if you see dependency errors. - Use
--best
to try newer versions.
Example:
sudo dnf system-upgrade download --releasever=42 --allowerasing --best
Step 4: Start the Fedora Upgrade
Once all the packages are downloaded, start Fedora Linux 42 upgrade task using command:
sudo dnf system-upgrade reboot
You will see the following message. Press y
and hit ENTER to continue.
The system will now reboot to upgrade to release version 42. Is this ok [y/N]: y
This will immediately reboot your system into upgrade mode.
Step 5: Wait for the Upgrade to Complete
Fedora will install the new release in a systemd environment. This will take several minutes to complete, depending upon the number of installed packages. Be patient.
Once done, it will automatically reboot into Fedora 42.
Fedora Post-Upgrade Cleanup (Optional but Recommended)
These steps help polish your new Fedora 42 installation:
1. Clean Up Retired Packages
Delete the unused or obsolete packages removed from Fedora using command:
sudo dnf install remove-retired-packages remove-retired-packages 41
2. Update Config Files
Review and merge config file changes:
sudo dnf install rpmconf sudo rpmconf -a
This updates settings in /etc/
that may have changed during upgrade.
3. Remove Duplicate & Orphaned Packages
Clean up duplicate versions and packages not in use by running the following commands one by one:
sudo dnf repoquery --duplicates sudo dnf remove --duplicates sudo dnf list --extras sudo dnf remove $(dnf repoquery --extras --exclude=kernel,kernel-*)
4. Clean Old Kernels
It is recommended to keep only the most recent 2–3 kernels and remove the older kernels to free up disk space.
To keep the latest 3 kernels, run:
sudo dnf remove $(dnf repoquery --installonly --latest-limit=-3)
5. Remove Broken Symlinks
Fix or remove soft links that point to deleted files.
sudo dnf install symlinks sudo symlinks -r -d /usr
6. Regenerate Rescue Kernel (Optional)
Ensures your system can recover if something breaks later.
sudo rm /boot/*rescue* sudo kernel-install add "$(uname -r)" "/lib/modules/$(uname -r)/vmlinuz" sudo dnf install dracut-config-rescue
7. Verify SELinux Contexts (if needed)
sudo fixfiles -B onboot sudo reboot
This fixes file labels for security enforcement.
Troubleshooting Tips
If packages are stuck or dependencies fail:
sudo dnf distro-sync --allowerasing
If you see package key errors, import the GPG key:
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-42-primary
If you encounter any issues, report them via Fedora Bugzilla.
Cheatsheet
Here is the simple cheatsheet that explains the Fedora Linux 42 upgrade steps.
Conclusion
You’ve now upgraded to Fedora Linux 42. Upgrading to Fedora 42 brings you the latest open source technologies with improved stability and features.
Whether you choose the GUI or CLI method, following this guide will ensure a smooth transition to Fedora 42.
Remember to perform all post-upgrade maintenance tasks and enjoy exploring the new release!
Resource: