I'm not a profi in BTRFS. I've been using it for a few weeks. Also I have to say that I know this case theoretically I did not do the tests but I have some idea of your questions.
- Either remove id 5 subvolume?
As far as I understand, BTRFS cannot delete the root subvolume.
- Or to merge current snapshot (current default subvolume) to it and remove it.
As far as I understand BTRFS does not know how to merge snapshots. It does not have this functionality.
BUT:
A snapshot is a subvolume like any other, with given initial content.
By default, snapshots are created read-write. File modifications in a
snapshot do not affect the files in the original subvolume.
See link.
I understand that a snapshot is a subvolume and it has all the features of a subvolume, but as we can see, it is marked as a snapshot. So it's not quite subvolume. :)
You change the default subvolume and thus you get a "merge". This is one of the right cases.
Another case:
EDITED: !!!WARNING!!! In your case, when you mount the root volume (subvolume), you may see the snapshot directory (or snapshot subvolume), be careful with sync, it may remove all files. I'm not sure if we can remove the snapshot volume as a snapshot directory, and I won't try to check that on a workstation. :) I would sync the files without the snapshot directory (or snapshot subvolume) and don't use mirror sync and use custom sync.
Have a subvolume and snapshot. To restore data from a snapshot, you can use a sync application (like rsync or I use FreeFileSync, I like the GUI) which can sync files like a mirror. In this case, you can have the restored subvolume and delete the snapshot. And go to drink tea or coffee.
See Recovering Files from Snapshots link.
How you can change your case to Another case? (EDITED)
I had a test. And I reverted root volume back as the default.
You did btrfs filesystem set-default snap_before_sid [path] it is the same of btrfs filesystem set-default 276 [path]. 276 - id of your snap_before_sid
And then you can do btrfs filesystem set-default 5 [path]. 5 - id of your <FS_TREE> i.e. root volume.
After that you can check default volume - btrfs subvolume get-default [path]. You should get an answer - ID 5 (FS_TREE).
Don't remember remount BTRFS again. You will see the root volume revert back.
The root volume is not lost forever. It will make the top level of the filesystem inaccessible until you revert root volume back as default. It is temporarily hidden.
And after that you can go to the Another case step and play around with rsync.
See link.
- Or to purge used space by id5 subvolume?
Sorry, I don't know. But I think BTRFS can not do this.
I hope my answer will help you.