Deleting Snapshots of the root File System

Note:

A snapshot can't be deleted if it's set as the default ID for a subvolume. Deleting a snapshot while it's in use as the root file system might cause system failure and requires a hard physical reset. Before deleting a snapshot that's set as the default subvolume for the root File System, change the default ID and reboot the system, for example:

sudo btrfs subvolume set-default 258 /
reboot

To delete a snapshot, do the following:

  1. Mount the top level of the file system.

    For example, run:

    sudo mount -o subvolid=5 /dev/sda2 /mnt
  2. Use the btrfs subvolume delete command to delete the snapshot.
    sudo btrfs subvolume delete /mnt/.snapshots/root-snapshot1
  3. Unmount the top level of the file system:
    sudo umount /mnt 

    The list of subvolumes relative to the root file system now doesn't include snapshots/root-snapshot1.

    sudo btrfs subvolume list /
    ID 256 gen 1332 top level 5 path boot
    ID 258 gen 1349 top level 5 path root
    ID 259 gen 1309 top level 5 path home
    ID 261 gen 1309 top level 258 path var/lib/portables