rpm-ostree Commands

Guide on using rpm-ostree commands to remove or restore system packages.

Remove a system package

To remove a system package, use the following command. In this example, Firefox and its language pack are removed:

1
rpm-ostree override remove firefox-langpacks-136.0.1-1.fc41.x86_64 firefox

Restore a system package

If you want to restore a previously removed package, use the following command. Here, Firefox and its language pack are reset:

1
rpm-ostree override reset firefox-langpacks-136.0.1-1.fc41.x86_64 firefox

Note: The command rpm-ostree override reset allows you to revert all overrides and restore the system to its original state.

Replace or downgrade the kernel

An alternative to the standard update process is to replace or downgrade the kernel using the following command:

1
sudo rpm-ostree override replace <http or local file paths of kernel packages>

For example, you can replace a kernel from a specific build server like this:

1
sudo rpm-ostree override replace https://koji.fedoraproject.org/koji/buildinfo?buildID=2667987

Reset the override

Once the required fix has been landed in the official repository, you can reset the changes to the kernel with the following command:

1
sudo rpm-ostree override reset <kernel packages that have been overridden>

Example: Kernel downgrade

In this example, the kernel was downgraded from version 6.13.8-200.fc41 to 6.13.5-200.fc41. The affected packages are:

  • kernel
  • kernel-core
  • kernel-modules
  • kernel-modules-core
  • kernel-modules-extra
  • kernel-tools
  • kernel-tools-libs
  • python3-perf

Command used:

1
sudo rpm-ostree override replace https://koji.fedoraproject.org/koji/buildinfo?buildID=2693823

To undo all changes, you can use the following command:

1
sudo rpm-ostree override reset

Useful tips

  • Rollback: If a previous deployment was working correctly, you can easily roll back to that state without manually modifying packages.
  • Reset overrides: The command rpm-ostree override reset resets all changes made to system packages. This is useful for returning the system to a clean state.