Administering an rpm-ostree based system
At the moment, there are four primary commands to be familiar with on
rpm-ostree based system. Also remember that in a Project Atomic
atomic host command (from the
Atomic command) is an
# rpm-ostree status
Will show you your deployments in the order in which they will appear in the
bootloader, the first deployment in the list being the current default one. The
● shows the currently booted deployment.
# rpm-ostree upgrade
Will perform a system upgrade, creating a new deployment (root filesystem) and
set it as the default for the next boot. You should use
# rpm-ostree rollback
This rolls back to the previous state, i.e. the default deployment changes
places with the non-default one. By default, the
rpm-ostree upgrade will keep
at most two bootable "deployments", though the underlying technology supports
# rpm-ostree deploy <version>
This command makes use of the server-side history feature of OSTree. It will search the history of the current branch for a commit with the specified version, and deploy it. This can be used in scripts to ensure consistent updates. For example, if the upstream OS vendor provides an update online, you might not want to deploy it until you've tested it. This helps ensure that when you upgrade, you are getting exactly what you asked for.
Hybrid image/packaging via package layering
It is possible to dynamically add more packages onto the system that are not part of the commit composed on the server. These additional "layered" packages are persistent across upgrades, rebases, and deploys (contrast with the ostree unlocking mechanism).
This is where the true hybrid image/package nature of rpm-ostree comes into play; you get a combination of the benefits of images and packages. The package updates are still fully transactional and offline.
For example, you can use package layering to install 3rd party
kernel modules, or userspace driver daemons such as
While most software should go into a container, you have full flexibilty
to use packages where it suits.
# rpm-ostree install <pkg>
Will download the target package, its dependencies, and create a new deployment with those packages installed. It is also possible to specify a local package which is not part of a repository.
To remove layered packages installed from a repository, use
<pkg>. To remove layered packages installed from a local package, you must
specify the full NEVRA of the package. For example,
In order to uninstall a package that is a part of the base layer, use
rpm-ostree override remove <pkg>.
rpm-ostree override remove firefox.
By default, every
rpm-ostree operation is "offline" - it has no effect
on your running system, and will only take effect when you reboot. This "pending" state is
called the "pending deployment". Operations can be chained; for example,
if you invoke
rpm-ostree upgrade after installing a package, your new root
will upgraded with the package also installed.
rpm-ostree rebase -b $branchname
Your operating system vendor may provide multiple base branches. For example, Fedora Atomic Host has branches of the form:
You can use the
rebase command to switch between these; this can represent a
major version upgrade, or logically switching between different "testing"
streams within the same release. Like every other
rpm-ostree operation, All
layered packages and local state will be carried across.
Other local state changes
man rpm-ostree for more. For example, there is an
command that enables local initramfs generation.
There is a generic
rpm-ostree ex command that offers experimental features.
One of those is
rpm-ostree ex livefs, which offers the ability to apply
changes from the pending deployment to the booted deployment.
man rpm-ostree for more information.
The only writable directories are
/var. In particular,
/usr has a read-only bind mount at all times. Any data in
never touched, and is shared across upgrades.
At upgrade time, the process takes the new default
/etc, and adds
your changes on top. This means that upgrades will receive new
default files in
/etc, which is quite a critical feature.
For more information, see OSTree: Adapting.