github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/volume_prune.md (about)

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