Deleting non mounted btrfs subvolumes

My output of

sudo btrfs subvolume list /

is

ID 256 gen 40068 top level 5 path home
ID 257 gen 39521 top level 5 path root
ID 258 gen 39510 top level 5 path root00
ID 259 gen 40068 top level 5 path root01
ID 260 gen 40056 top level 259 path .snapshots

I don’t actually need or want root/root00 or .snapshots

I have tried removing them using for example

sudo btrfs subvolume delete 257 --subvolid

but that outputs the clearly incorrect

invalid option 'i'

which it wouldn’t know of -i if --subvolid was invalid.

How do I clean up these subvolumes?

You can run

sudo btrfs subvolume delete -i 257 /

or

sudo btrfs subvolume delete /root

delete [options] <[<subvolume> [<subvolume>...]], delete -i|--subvolid <subvolid> <path>>
           Delete the subvolume(s) from the filesystem.

           If <subvolume> is not a subvolume, btrfs returns an error but continues if there are more arguments to process.

           If --subvolid is used, <path> must point to a btrfs filesystem.
1 Like

That was easy thank you