# info > BTRFS-SUBVOLUME

---
type: CommandReference
command: btrfs-subvolume
mode: man
section: 8
source: man-pages
---

## Quick Reference
- `btrfs subvolume create <name>` — create a subvolume
- `btrfs subvolume delete <subvolume>` — delete a subvolume
- `btrfs subvolume list <path>` — list subvolumes
- `btrfs subvolume snapshot <source> <dest>` — create a writable snapshot
- `btrfs subvolume snapshot -r <source> <dest>` — create a read-only snapshot
- `btrfs subvolume set-default <id> <path>` — set default subvolume for mount
- `btrfs subvolume show <path>` — show subvolume details
- `btrfs subvolume sync <path>` — wait for deletion to complete

## Name
`btrfs-subvolume` — manage btrfs subvolumes

## Synopsis
`btrfs subvolume <subcommand> [<args>]`

## Options

### create
`btrfs subvolume create [-i <qgroupid>] [<dest>/]<name>` — Create a subvolume.
- `-i <qgroupid>` — Add subvolume to a qgroup (can be given multiple times).

### delete
`btrfs subvolume delete [options] <subvolume> [<subvolume>...]` or `delete -i|--subvolid <subvolid> <path>` — Delete subvolume(s).
- `-c, --commit-after` — Wait for transaction commit at end.
- `-C, --commit-each` — Wait for commit after each subvolume.
- `-i, --subvolid <subvolid>` — Delete by subvolume ID; `<path>` must point to the filesystem.
- `-v, --verbose` — (deprecated) alias for global `-v`.

### find-new
`btrfs subvolume find-new <subvolume> <last_gen>` — List files modified after `<last_gen>` generation.

### get-default
`btrfs subvolume get-default <path>` — Print the default subvolume of the filesystem at `<path>`.

### list
`btrfs subvolume list [options] [-G [+|-]<value>] [-C [+|-]<value>] [--sort=<fields>] <path>` — List subvolumes.
- Path filtering: `-o` (only below path), `-a` (all, with absolute/relative paths).
- Field selection: `-p` (parent ID), `-c` (origin generation), `-g` (generation), `-u` (UUID), `-q` (parent UUID), `-R` (received UUID).
- Type filtering: `-s` (snapshots only), `-r` (read-only only), `-d` (deleted, not cleaned).
- Output: `-t` (table format).
- Generation filters: `-G [+|-]<value>`, `-C [+|-]<value>`.
- `--sort=rootid,gen,ogen,path` — Sort by field; prepend `+` for ascending, `-` for descending.

### set-default
`btrfs subvolume set-default [<subvolume>|<id> <path>]` — Set the default subvolume for the filesystem at `<path>`. Default hides the top-level subvolume (id 5) on next mount.

### show
`btrfs subvolume show [options] <path>` — Show detailed subvolume information (UUIDs, generation, flags, snapshots).
- `-r, --rootid <ID>` — Look up subvolume by root ID in `<path>`.
- `-u, --uuid <UUID>` — Look up subvolume by UUID in `<path>`.

### snapshot
`btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>` — Create a snapshot of `<source>` at `<dest>`. If only `<dest>` is given, the snapshot name is the basename of `<source>`.
- `-r` — Make snapshot read-only.
- `-i <qgroupid>` — Add subvolume to a qgroup (multiple).

### sync
`btrfs subvolume sync <path> [subvolid...]` — Wait for deletion of specified subvolumes. If no IDs given, wait for all pending deletions.
- `-s <N>` — Sleep `N` seconds between checks (default: 1).

## Examples

Delete subvolume `foo` from the volume mounted at `/mnt/bar`:
shell
btrfs subvolume delete /mnt/bar/foo
## See Also
[mkfs.btrfs(8)](http://localhost/phpMan.php/man/mkfs.btrfs/8/markdown), [mount(8)](http://localhost/phpMan.php/man/mount/8/markdown), [btrfs-quota(8)](http://localhost/phpMan.php/man/btrfs-quota/8/markdown), [btrfs-qgroup(8)](http://localhost/phpMan.php/man/btrfs-qgroup/8/markdown), [btrfs-send(8)](http://localhost/phpMan.php/man/btrfs-send/8/markdown)

## Exit Codes
Returns **0** on success, non-zero on failure.