Updated: 4 November 2026 · Applies to: Fedora 44 (tested: dnf5 5.4.6, Flatpak 1.18.4, release upgrade download to Fedora 45); the same dnf5 commands apply to other current Fedora releases

To update Fedora Linux from the terminal, run sudo dnf upgrade --refresh, then reboot if the kernel or core libraries were updated. Flatpak apps are not part of that: update them with flatpak update. To move to the next Fedora release, use sudo dnf system-upgrade download --releasever=NUMBER followed by sudo dnf offline reboot (section 5).

1. Update all packages

  1. See what is waiting (optional):
    $ dnf check-upgrade
    Upgrades
    glib2.x86_64 2.88.4-1.fc44 updates
    In a script, the exit code tells you the result: 100 means updates are available, 0 means none.
  2. Install the updates. --refresh makes dnf download fresh repository data first instead of trusting its cached copy. Lab example from our Fedora 44 test container (shortened):
    $ sudo dnf upgrade --refresh
    Updating and loading repositories:
     Fedora 44 - x86_64 - Updates           100% |  27.2 KiB/s |   8.0 KiB |  00m00s
     Fedora 44 - x86_64                     100% |  71.0 KiB/s |  20.8 KiB |  00m00s
    Repositories loaded.
    Package            Arch   Version         Repository                            Size
    Upgrading:
     glib2             x86_64 0:2.88.4-1.fc44 updates                           15.4 MiB
    ...
    Transaction Summary:
     Upgrading:          1 package
     Replacing:          1 package
    ...
    Complete!
    dnf asks for confirmation before it changes anything; add -y to answer yes automatically. sudo dnf update does the same thing: in dnf5, update is an alias for upgrade.
  3. Check whether a reboot is needed:
    sudo dnf needs-restarting
    According to the dnf5 manual, it reports whether important packages were installed or upgraded since boot and exits with code 1 when a reboot is recommended. sudo dnf needs-restarting -s lists systemd services to restart instead. The command comes from the dnf5-plugins package, which was already installed in our test.

Every run is logged: dnf history list shows past transactions (see How to Use dnf history (yum history) to See Installed and Removed Packages).

2. Install only security updates

dnf advisory list --updates        # advisories that apply to this system
sudo dnf upgrade --security        # only packages with a security advisory

In our test the only pending update was an enhancement, so the security run changed nothing:

$ dnf advisory list --updates
Name                   Type        Severity                    Package              Issued
FEDORA-2026-b3899dbeca enhancement None     glib2-2.88.4-1.fc44.x86_64 2026-10-10 01:58:07

$ sudo dnf upgrade --security
Updating and loading repositories:
Repositories loaded.
No match in selected advisories

Nothing to do.

dnf5 can also filter by severity, for example --advisory-severities=critical,important. To hold back one package, see 4 Ways to Lock or Exclude Package Updates with dnf (yum).

3. Offline updates (installed during a reboot)

An offline update downloads everything now and installs it in a minimal environment during the next reboot, when no programs are using the files.

$ sudo dnf upgrade --offline -y
...
Transaction stored to be performed offline. Run `dnf5 offline reboot` to reboot and run the transaction. To cancel the transaction and delete the downloaded files, use `dnf5 offline clean`.
Complete!

$ dnf offline status
An offline transaction was initiated by the following command:
	dnf upgrade --offline -y
Run `dnf5 offline reboot` to reboot and perform the offline transaction.

Then run sudo dnf offline reboot to install, or sudo dnf offline clean to cancel. According to the dnf5 manual, dnf offline reboot --poweroff switches the machine off when the update is done, and dnf offline log shows the log of past offline runs.

4. Update Flatpak apps from the terminal

Flatpak apps (from Flathub, for example) have their own update command, and dnf upgrade does not touch them:

flatpak update                   # update all apps and runtimes, asks first
flatpak update -y                # same, without the question
flatpak update --user            # apps installed for your user only
flatpak remote-ls --updates      # list available updates without installing
flatpak uninstall --unused       # remove runtimes no app needs any more

With everything current, the output is short (Flatpak 1.18.4 on Fedora 44, lab example):

$ flatpak update
Looking for updates…

Nothing to update.

Without --user, Flatpak works on the system-wide installation, which is the default.

5. Upgrade to a new Fedora release

Each Fedora release is maintained for about 13 months: according to the Fedora release life cycle, release N is supported until four weeks after release N+2 comes out. Upgrade before your release reaches end of life, or it stops getting security updates. Back up your data first.

  1. Bring the current release fully up to date and reboot:
    sudo dnf upgrade --refresh
    sudo reboot
  2. Download the new release. Replace 45 with the version you want, and upgrade only to a release Fedora has officially published (Fedora 45 was still a pre-release in our test):
    sudo dnf system-upgrade download --releasever=45
    In our test this planned 351 upgrades, 362 replacements and 10 downgrades (223 MiB to download), imported the Fedora 45 signing key and ended with:
    Importing OpenPGP key 0xF577861E:
     UserID     : "Fedora (45) <fedora-45-primary@fedoraproject.org>"
    ...
    The key was successfully imported.
    Transaction stored to be performed offline. Run `dnf5 offline reboot` to reboot and run the transaction. To cancel the transaction and delete the downloaded files, use `dnf5 offline clean`.
    Complete!
    If dnf reports conflicts with third-party packages, add --allowerasing to let it remove the packages that block the upgrade.
  3. Reboot into the upgrade. It takes a while; do not switch the machine off:
    sudo dnf offline reboot
    sudo dnf system-upgrade reboot does the same thing.
  4. After the upgrade, check the new version with cat /etc/fedora-release.

On a remote server, keep a way back in before you reboot, such as the VNC console of a Ucartz VPS (see How to Access Your VPS via VNC in Virtualizor).

6. Automatic updates

To let the server check for updates by itself, install the dnf5 automatic plugin and enable its timer:

sudo dnf install dnf5-plugin-automatic
sudo systemctl enable --now dnf5-automatic.timer

The defaults in /usr/share/dnf5/dnf5-plugins/automatic.conf only download updates (download_updates = yes, apply_updates = no, reboot = never), and the timer runs daily at 6:00 with up to 60 minutes of random delay. To install updates too, put your changes in /etc/dnf/automatic.conf, for example:

[commands]
apply_updates = yes
upgrade_type = security

According to the dnf5 manual, upgrade_type = default installs all updates and security only security updates.

If you would rather not look after updates yourself, our Linux server management team handles patching, hardening and monitoring. To install or hold a specific package version, see How to Install, Downgrade or Lock a Specific Package Version with dnf (AlmaLinux, Rocky Linux, RHEL and Fedora), and if an update was interrupted, How to Recover an Interrupted dnf or apt Package Transaction.

Official documentation: Upgrading Fedora Linux using the DNF system plugin and Fedora Linux release life cycle.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket