github.com/panekj/cli@v0.0.0-20230304125325-467dd2f3797e/docs/reference/commandline/volume_prune.md (about) 1 # volume prune 2 3 <!---MARKER_GEN_START--> 4 Remove all unused local volumes 5 6 ### Options 7 8 | Name | Type | Default | Description | 9 |:----------------------|:---------|:--------|:---------------------------------------------| 10 | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<label>`) | 11 | `-f`, `--force` | | | Do not prompt for confirmation | 12 13 14 <!---MARKER_GEN_END--> 15 16 ## Description 17 18 Remove all unused local volumes. Unused local volumes are those which are not referenced by any containers 19 20 ## Examples 21 22 ```console 23 $ docker volume prune 24 25 WARNING! This will remove all local volumes not used by at least one container. 26 Are you sure you want to continue? [y/N] y 27 Deleted Volumes: 28 07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e 29 my-named-vol 30 31 Total reclaimed space: 36 B 32 ``` 33 34 ### <a name="filter"></a> Filtering (--filter) 35 36 The filtering flag (`--filter`) format is of "key=value". If there is more 37 than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) 38 39 The currently supported filters are: 40 41 * label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove volumes with (or without, in case `label!=...` is used) the specified labels. 42 43 The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`), 44 which removes volumes with the specified labels. The other 45 format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes 46 volumes without the specified labels. 47 48 49 ## Related commands 50 51 * [volume create](volume_create.md) 52 * [volume ls](volume_ls.md) 53 * [volume inspect](volume_inspect.md) 54 * [volume rm](volume_rm.md) 55 * [Understand Data Volumes](https://docs.docker.com/storage/volumes/) 56 * [system df](system_df.md) 57 * [container prune](container_prune.md) 58 * [image prune](image_prune.md) 59 * [network prune](network_prune.md) 60 * [system prune](system_prune.md)