Updates, Upgrades & Rollbacks

Installing updates with Fedora Sway Atomic is easy and fast. It also has a special rollback feature, in case anything goes wrong. Additionally, you can choose to have multiple versions of your operating system installed at all times, and you can choose which one to boot into whenever you start up your system.

Updating Fedora Sway Atomic

OS updates currently have to be managed via the command line. To do this, run:

$ rpm-ostree upgrade

This will check for new updates and download and install them if they are available. Alternatively, to check for available updates without downloading them, run:

$ rpm-ostree upgrade --check

Upgrading between major versions

Upgrading between major versions (such as from Fedora 39 to Fedora 40) can be done using the rpm-ostree command.

Skipping major releases is currently untested and is thus not supported. You should update only one major release at a time, i.e. from Fedora 39 to 40, etc.

First, make sure that you are running the latest update for the current version:

$ rpm-ostree upgrade

Reboot your system if needed. Then, verify that the branch for the next major version is available. You can print all available branches for Fedora Sway Atomic with this command:

$ ostree remote refs fedora | grep sericea | grep $(uname -m)

After you’ve verified the name of your branch, you are ready to proceed. For example, to upgrade to Fedora Sway Atomic 40, the command is:

$ rpm-ostree rebase fedora:fedora/40/x86_64/sericea
Currently, the default remote for Fedora Sway Atomic 40 is named fedora. If this is not the case for your system, you can find out the remote name by issuing: ostree remote list.

The process is very similar to a system update: the new OS is downloaded and installed in the background, and you just boot into it when it is ready.

Additionally, you can choose to rebase to a different immutable variant of Fedora, like for example Fedora Silverblue. Fedora Silverblue is similar to Fedora Sway Atomic, except for the fact that it uses the GNOME desktop environment instead of the default Sway Wayland compositor.

What this means is, you can rebase to Fedora Silverblue to try it out, without ever touching your current system. Because the two system images are isolated from eachother, the two desktop environments will never be installed at the same time. All of your flatpak apps and /home files will stay persistent between rebases. Same applies for testing out the bleeding-edge version of Fedora Sway Atomic, which is Rawhide.

If you decide to rebase, make sure to pin your current deployment, so you don’t accidentaly lose it (by default, only the two most recent deployments are kept).

Rolling back

Fedora Sway Atomic keeps a record of the previous OS version, which can be switched to instead of the latest version. While this shouldn’t usually be necessary, it can be helpful if there is a problem with an update or an upgrade (rollbacks work the same way for both), as well as for development purposes.

There are two ways to roll back to the previous version:

  1. Temporary rollbacks: to temporarily roll back to a previous version, simply reboot and select the previous version from the boot menu (often known as the grub menu).

  2. Permanent rollbacks: to permanently switch back to the previous deployment, use the rpm-ostree rollback command.

After rolling back, you will technically be on an old OS version, and may be prompted to update. Updating will undo the rollback, so should be avoided if you want the rollback to stay in effect.

rpm-ostree only keeps one rollback version available by default. If you want to rollback to another version that the one currently available on your system, you can do so with the following commands:

  1. Pull the ostree commit log from the remote repository:

    $ sudo ostree pull --commit-metadata-only --depth=10 fedora fedora/40/x86_64/sericea
  2. Display the log:

    $ ostree log fedora:fedora/40/x86_64/sericea
  3. Deploy a specific commit:

    $ rpm-ostree deploy 40.20230716.0

Note that this will deploy the exact version as requested and will not include overlayed packages and other changes.