1. Home
  2. Linux
  3. How to downgrade and upgrade releases in rpm ostree

How to downgrade and upgrade releases in RPM-OSTree

If you’re using an RPM-OSTree-based operating system—like Fedora Silverblue, Fedora Kinoite, Fedora Onyx, Fedora Sericea, CoreOS, and others—and want to understand how downgrading and upgrading works, this article is for you. Follow along as we explore how to upgrade and downgrade your RPM-OSTree-based operating system.

Fedora RPM-OSTree hero image.

What is RPM-OSTree?

RPM-OSTree is a tool used to handle updates for specific operating systems, like Fedora Silverblue and CoreOS. It makes the system read-only, meaning changes are made in separate images that can’t be changed after they’re set up. Users make changes to their system using the rpm-ostree command, and each change is called a “mutation.” These mutations are added over the original system and can be easily removed if needed. Operating systems that use RPM-OSTree are safe and secure, but still easy to customize just like other Linux systems.

There are quite a few rpm-ostree commands that users can utilize to interact with operating systems like Silverblue and CoreOS. Here’s an outline of basic rpm-ostree commands and what they do.

  • rpm-ostree upgrade: Running this command will install new package updates on your RPM-OSTree-based operating system.
  • rpm-ostree rollback: This command can be run if you encounter issues. It rolls your system back to the previous version to ensure stability.
  • rpm-ostree status: Use this if you need to peek under the hood and check what versions of the OS you have installed, what packages you’ve added, etc.
  • rpm-ostree install [package-name]: If you wish to install a package not included in the base RPM-OSTree image, this command can do it. However, it’s only limited to the RPM package format.
  • rpm-ostree uninstall [package-name]: If you wish to remove a package from your RPM-OSTree system, this command can do so.
  • rpm-ostree search [package-name]: If you want to search for a package in the software repositories, run this command.
  • rpm-ostree update --check: If you wish to check for available updates without installing them, you can run this command.

These commands act as the basic toolbox for managing and interacting with RPM-OSTree-based operating systems, providing users with control over updates, modifications, and system checks.

How to downgrade a release with RPM-OSTree

If you wish to downgrade a release of your RPM-OSTree-powered operating system to a previous one, you use the “rebase” command. In this tutorial, we’ll be working with Fedora Silverblue/Kinoite. However, these commands apply to all systems that use RPM-OSTree.

To start, you’ll need to find the new release to “rebase” to. For example, if you’ve upgraded your system to Fedora 39 and you’re having stability issues because it just came out, you could “rebase” to Fedora 38.

To view versions of Fedora that make use of RPM-OSTree, start by opening up a terminal window on the desktop. Once the terminal window is open, use the ostree command to view available releases.

ostree remote refs fedora

After running the command above, your Fedora system will show all available “refs” that you can use to rebase your system. For example, if you’re currently running Fedora Silverblue 39 but want to downgrade to Fedora Silverblue 38, you can do that.

When you’ve found the remote “ref” you wish to downgrade to, you can easily “rebase” your system. For example, to downgrade from Fedora 39 to 38, enter the following command:

sudo rpm-ostree rebase fedora:fedora/38/x86_64/silverblue`

Rebasing will take a couple of minutes to complete. However, once it is done, reboot and log back in. After logging back in, you can purge other RPM-OSTree deployments on your system with:

sudo rpm-ostree cleanup --rollback

Once everything is cleaned up, you’ll have successfully downgraded your RPM-OSTree operating system!

How to upgrade a release with RPM-OSTree

If you wish to upgrade to a new release on an RPM-OSTree-based operating system, you must do the same thing as downgrading. Except, instead of selecting an earlier “ref” with an older image to “rebase” on, you’ll be selecting a newer release.

For example, if you wish to upgrade to Fedora Rawhide, so you can test out what the Fedora team currently has in development, you can do so by selecting it as the “ref” to “rebase” on with the rpm-ostree command.

To start, find the “ref” you wish to upgrade your system to. In this example, we’ll use the Fedora Rawhide ref. You can find a “ref” by executing the following ostree command.

Fedora RPM-OSTree image references.

ostree remote refs fedora | grep "rawhide"

When you run the command above, you’ll get a list of Fedora Rawhide “refs”. Choose your version to upgrade to. Silverblue has Gnome Shell, Kinoite has KDE Plasma, Onyx has Budgie, and Sericea has the Sway window manager.

fedora:fedora/rawhide/aarch64/kinoite  
fedora:fedora/rawhide/aarch64/sericea  
fedora:fedora/rawhide/aarch64/silverblue  
fedora:fedora/rawhide/ppc64le/kinoite  
fedora:fedora/rawhide/ppc64le/sericea  
fedora:fedora/rawhide/ppc64le/silverblue  
fedora:fedora/rawhide/x86_64/kinoite  
fedora:fedora/rawhide/x86_64/onyx  
fedora:fedora/rawhide/x86_64/sericea  
fedora:fedora/rawhide/x86_64/silverblue

When you’ve made your decision, you can upgrade your system to Fedora Rawhide by running the following rebase command.

Rebasing Fedora Kinoite on Rawhide from 38.

sudo rpm-ostree rebase fedora:fedora/rawhide/x86_64/kinoite 

After you’ve rebased your system, you will need to reboot. Once you reboot, you’ll be able to boot into your upgrade. However, if you aren’t happy with the upgrade, follow the “Downgrade” section of this guide to go back.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.