# Using rpm-ostree

**URL:** <https://universal-blue.discourse.group/t/using-rpm-ostree/513>\
**Category:** General\
**Created:** [January 28, 2024, 8:05pm UTC](https://universal-blue.discourse.group/t/using-rpm-ostree/513 "2024-01-28T20:05:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![j0rge](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/j0rge/32/8_2.png) [@j0rge](https://universal-blue.discourse.group/u/j0rge)\
**Post date:** [January 28, 2024, 8:05pm UTC](https://universal-blue.discourse.group/t/using-rpm-ostree/513/1 "2024-01-28T20:05:10Z")

</div>

Note that this is a cheatsheet and not a replacement for the official documentation:

- [ostree](https://ostreedev.github.io/ostree/)
- [rpm-ostree](https://coreos.github.io/rpm-ostree/)

OStree is how the root filesystem is managed in Universal Blue images. It can have multiple deployments including 1 active deployment and 1 or more standby or rollback deployments.

## Managing ostree

### Update ostree

Pull updated version based on your current upstream repository.

```auto
rpm-ostree upgrade

```

> Note: Using the `ublue update` command includes this step.

### Roll back deployment

This will change your next target boot to the previous deployment. Use this if you have issues with your current booted deployment.

```auto
rpm-ostree rollback

```

### Add rpm package

Install a new package layered on top of the file system tree.  
Add `--now` to layer on top of the active tree.

```auto
rpm-ostree install $PACKAGE

```

### Get ostree status

See the current booted file system tree and any layered packages.

```auto
rpm-ostree status

```

> **Note:** This is very handy when getting help and reporting issues!

### Pin a file system tree

To pin your current file system use `0` and for the previous booted file system use `1`.  
This will keep a deployment available so it is not garbage collected.

Useful for major version changes and kernel changes.

```auto
sudo ostree admin pin 0

```

* * *

Original Docs and Cheatsheet: [Justin Garrison](https://justingarrison.com/) and [Erwan Le Floch](https://github.com/erlefloch)

---

<div class="post-metadata">

**Author:** ![larina3315](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@larina3315](https://universal-blue.discourse.group/u/larina3315)\
**Post date:** [January 28, 2024, 8:54pm UTC](https://universal-blue.discourse.group/t/using-rpm-ostree/513/2 "2024-01-28T20:54:09Z")

</div>

> **[GitHub - Szwendacz99/fedora-immutable-cheatsheet: A cheatsheet for immutable...](https://github.com/Szwendacz99/fedora-immutable-cheatsheet)**
>
> A cheatsheet for immutable fedora variants, usually about ostree and rpm-ostree - GitHub - Szwendacz99/fedora-immutable-cheatsheet: A cheatsheet for immutable fedora variants, usually about ostree ...

Check out this GH repo

---

<div class="post-metadata">

**Author:** ![zartarr88](https://avatars.discourse-cdn.com/v4/letter/z/eb9ed0/32.png) [@zartarr88](https://universal-blue.discourse.group/u/zartarr88)\
**Post date:** [January 29, 2024, 7:47pm UTC](https://universal-blue.discourse.group/t/using-rpm-ostree/513/3 "2024-01-29T19:47:26Z")

</div>

`sudo ostree admin pin --unpin <pinned index number>` to unpin any pinned ones
