Rpm-ostree broken on "Cleaning deployments"

Hi all! I’m running into a bit of an issue. Anytime I try to do anything with the rpm-ostree command (other than rpm-ostree status) I get the following error.

error: Cleaning deployments: Removing ostree/deploy/fedora/deploy/88a124787edacd26ee2573c2ce185717a0f4f59db88960666a9e0e895e8b9f55.0: unlinkat(libfreerdp2.so.2): Read-only file system

I would just rollback with rpm-ostree, however as you can see that command it’s self is the issue. Commands such as rpm-ostree rollback, rpm-ostree reset, rpm-ostree deploy, etc all seem to run fine until the very end when the whole process crashes and I get that error.

You might want to check the file system. I have been using Silverblue for a couple of years now and something similar happened to me more than a few times. Rpm-ostree stops working correctly because of some trouble with some file under ostree/. Either a file cannot be deleted or the file system gets remounted as a read-only file system. I can’t say I know for sure, but I suspect the btrfs. It gets partially corrupted or something because checking and repairing the file system almost always helped. Except that one time when btrfs repair trashed the whole fs.

There was another user recentely with similar issue here and repairing btrfs helped him also.