github.com/yogeshlonkar/moby@v1.13.2-0.20201203103638-c0b64beaea94/docs/reference/commandline/volume_prune.md (about)

     1  ---
     2  title: "volume prune"
     3  description: "Remove unused volumes"
     4  keywords: "volume, prune, delete"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # volume prune
    17  
    18  ```markdown
    19  Usage:	docker volume prune [OPTIONS]
    20  
    21  Remove all unused volumes
    22  
    23  Options:
    24    -f, --force   Do not prompt for confirmation
    25        --help    Print usage
    26  ```
    27  
    28  ## Description
    29  
    30  Remove all unused volumes. Unused volumes are those which are not referenced by any containers
    31  
    32  ## Examples
    33  
    34  ```bash
    35  $ docker volume prune
    36  
    37  WARNING! This will remove all volumes not used by at least one container.
    38  Are you sure you want to continue? [y/N] y
    39  Deleted Volumes:
    40  07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e
    41  my-named-vol
    42  
    43  Total reclaimed space: 36 B
    44  ```
    45  
    46  ## Related commands
    47  
    48  * [volume create](volume_create.md)
    49  * [volume ls](volume_ls.md)
    50  * [volume inspect](volume_inspect.md)
    51  * [volume rm](volume_rm.md)
    52  * [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
    53  * [system df](system_df.md)
    54  * [container prune](container_prune.md)
    55  * [image prune](image_prune.md)
    56  * [network prune](network_prune.md)
    57  * [system prune](system_prune.md)