command: docker volume prune
short: Remove unused local volumes
long: |-
    Remove all unused local volumes. Unused local volumes are those which are not
    referenced by any containers. By default, it only removes anonymous volumes.
usage: docker volume prune [OPTIONS]
pname: docker volume
plink: docker_volume.yaml
options:
    - option: all
      shorthand: a
      value_type: bool
      default_value: "false"
      description: Remove all unused volumes, not just anonymous ones
      details_url: '#all'
      deprecated: false
      hidden: false
      min_api_version: "1.42"
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: filter
      value_type: filter
      description: Provide filter values (e.g. `label=<label>`)
      details_url: '#filter'
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
    - option: force
      shorthand: f
      value_type: bool
      default_value: "false"
      description: Do not prompt for confirmation
      deprecated: false
      hidden: false
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
inherited_options:
    - option: help
      value_type: bool
      default_value: "false"
      description: Print usage
      deprecated: false
      hidden: true
      experimental: false
      experimentalcli: false
      kubernetes: false
      swarm: false
examples: |-
    ```console
    $ docker volume prune

    WARNING! This will remove anonymous local volumes not used by at least one container.
    Are you sure you want to continue? [y/N] y
    Deleted Volumes:
    07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e

    Total reclaimed space: 36 B
    ```

    ### Filtering (--all, -a) {#all}

    Use the `--all` flag to prune both unused anonymous and named volumes.

    ### Filtering (--filter) {#filter}

    The filtering flag (`--filter`) format is of "key=value". If there is more
    than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)

    The currently supported filters are:

    * 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.

    The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
    which removes volumes with the specified labels. The other
    format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
    volumes without the specified labels.
deprecated: false
hidden: false
min_api_version: "1.25"
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

