How to Update a Fedora Linux System

No matter whatever distro you’re using, it’s important to keep all the packages up-to-date. Package updates contain various improvements, bug fixes, security patches, and new/improved features.

In this guide, check out how to update the Fedora Linux system.

Updating Fedora

Fedora is an RPM-based Linux distro that’s maintained by the Fedora Project. Fedora acts as the testing ground for future releases of Red Hat Enterprise Linux. While Fedora is open-source software, RHEL isn’t. However, both share the same base.

Fedora is suitable for all sorts of usage. It can be used either for general-purpose use, server, workstation, and others. Fedora receives updates regularly.

Depending on the UI, there are two ways of updating Fedora: GUI and CLI.

Update Fedora using GUI

By default, Fedora comes with the GNOME desktop. One major feature of the GNOME desktop is, it also comes with a bunch of powerful tools. The following method demonstrates how to update Fedora using the GNOME Software tool.

Launch GNOME Software. It’s a GUI tool for easier package and repository management.

Go to the “Updates” tab. If there’s any update available to any package, it’ll show up here. To recheck for any available update, click the refresh icon at the top-left corner.

To install updates, click the “Download” button. The action will require root privilege.

Voila! All the packages are updated!

Update Fedora using CLI

Fedora is easier to keep updated using the package managers it comes with. Fedora supports both DNF and YUM package managers. However, it’s recommended to use DNF because it’s an upgrade over the traditional YUM.

Update Fedora using YUM

Launch the terminal. While this first step is optional, it may help to fix certain problems related to updating packages. Clean the local YUM repo cache.

$ sudo yum clean all

The following YUM command will check for any available updates. If the cache were cleaned previously, it’d rebuild the cache as well.

$ sudo yum check-update

If there’s any update available, run the following command to install them all.

$ sudo yum update

Alternatively, to update only the selected package(s), use the following command structure.

$ sudo yum update <package_1> <package_2>

Update Fedora using DNF

DNF is the default package manager that Fedora incorporates. It solves many of the problems that YUM had (memory inefficiency, slower performance, etc.) while delivering almost the same user experience.

Using DNF to update is almost similar to using YUM. Launch a terminal and clean the DNF cache. It’s an optional task.

$ sudo dnf clean all

Check if there’s any update available. If the cache was cleaned, then DNF will rebuild the cache automatically.

$ sudo dnf check-update

If any package update is available, the following DNF command will install all of them.

$ sudo dnf update

Alternatively, to update specific packages, use the following command structure.

$ sudo dnf update <package_1> <package_2>

Upgrading Fedora

When there’s a new version of Fedora available, installing it without completely reinstalling the entire operating system is possible. Note that this process may take quite a while. It’s always recommended to back up your important data, especially those located in the system directories.

Ready? Let’s get started! We’ll be using the DNF package manager to do the job.

First, check if all the currently installed packages are up-to-date.

$ sudo dnf upgrade --refresh

To upgrade the system, DNF requires a system upgrade plugin. Install the system upgrade plugin for DNF.

$ sudo dnf install dnf-plugin-system-upgrade

The next step is to download the system upgrade. Double-check the Fedora system version you’re upgrading to. Check out the latest version of Fedora.

$ sudo system-upgrade download --refresh --releasever=<target_fedora_version>

Finally, reboot the system to finish the upgrade process.

$ sudo dnf system-upgrade reboot

Final thoughts

Keeping Fedora updated is an easy task. Depending on your comfort, follow the method that meets the need.

Interested to learn more about the Fedora package managers? Check out how to use the DNF package manager. The guide is on CentOS, but the same commands and methods apply to Fedora as well.

Happy computing.

About the author

Sidratul Muntaha

Sidratul Muntaha

Student of CSE. I love Linux and playing with tech and gadgets. I use both Ubuntu and Linux Mint.