How to check for update info and changelogs with rpm-ostree db
======
![][1]
Photo by [Dan-Cristian Pădureț][2] on [Unsplash][3]
This article will teach you how to check for updates, check the changed packages, and read the changelogs with _rpm-ostree db_ and its subcommands.
The commands will be demoed on a Fedora Silverblue installation and should work on any OS that uses _rpm-ostree_.
### Introduction
Let’s say you are interested in immutable systems. Using a base system that is read-only while you build your use cases on top of containers technology sounds very attractive and it persuades you to select a distro that uses _rpm-ostree_.
You now find yourself on [Fedora Silverblue][4] (or another similar distro) and you want to check for updates. But you hit a problem. While you can find the updated packages on Fedora Silverblue with GNOME Software, you can’t actually read their changelogs. You also can’t [use _dnf updateinfo_ to read them on the command line][5], since there’s no DNF on the host system.
So, what should you do? Well, _rpm-ostree_ has subcommands that can help in this situation.
### Checking for updates
The first step is to check for updates. Simply run _rpm-ostree upgrade –check_:
GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
SecAdvisories: 1 moderate
Diff: 4 upgraded
```
Notice that while it doesn’t tell the updated packages in the output, it does show the Commit for the update as _d8bab818f5abcfb58d2c038614965bf26426d55667e52018fcd295b9bfbc88b4_. This will be useful later.
Next thing you need to do is find the Commit for the current deployment you are running. Run _rpm-ostree status_ to get the BaseCommit of the current deployment:
GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
RemovedBasePackages: ...
LayeredPackages: ...
...
```
For this example BaseCommit is _e279286dcd8b5e231cff15c4130a4b1f5a03b6735327b213ee474332b311dd1e_.
Now you can find the diff of the two commits with _rpm-ostree db diff [commit1] [commit2]_. In this command _commit1_ will be the BaseCommit from the current deployment and _commit2_ will be the Commit from the upgrade checking command.
```
$ rpm-ostree db diff e279286dcd8b5e231cff15c4130a4b1f5a03b6735327b213ee474332b311dd1e d8bab818f5abcfb58d2c038614965bf26426d55667e52018fcd295b9bfbc88b4
ostree diff commit to: d8bab818f5abcfb58d2c038614965bf26426d55667e52018fcd295b9bfbc88b4
Upgraded:
soundtouch 2.1.1-6.fc34 -> 2.1.2-1.fc34
```
The diff output shows that _soundtouch_ was updated and indicates the version numbers. View the changelogs by adding _–changelogs_ to the previous command:
```
$ rpm-ostree db diff e279286dcd8b5e231cff15c4130a4b1f5a03b6735327b213ee474332b311dd1e d8bab818f5abcfb58d2c038614965bf26426d55667e52018fcd295b9bfbc88b4 --changelogs