How to revert rpm-ostree reset?

For debugging reasons, I executed rpm-ostree reset and booted into the new deployment. But how do I revert that?

I can obviously boot into the previous old deployment. However, if I upgrade or so, I still do end up in the new deployment, with all my layered packages etc. being removed.
I do not want that, this was just a test after all, I want to continue using my overlays…

Of course, I could just rpm-ostree install … all of them, but there must be an easier way!


Cross-posted on Unix Stackexchange

You can revert it to the previously booted deployment using

rpm-ostree rollback

Ah no that would just set the current deployment as the default. However, that command gave me a helpful hint. You can run:

rpm-ostree cleanup -p

This resets the pending deployments (-p) i.e. the ones you have not applied. The reset operation apparently also creates such a pending deployment, so if you then run the usual update…:

rpm-ostree upgrade

…you get back your layers and modifications, but have a new update e.g.

1 Like

Addendum: Maybe you’d need to clean more cached data in such a case, otherwise you may get more errors when doing down/upgrades here:

rpm-ostree cleanup -pbm