2016-10-14 18:30:36 -04:00
|
|
|
---
|
|
|
|
title: "volume prune"
|
|
|
|
description: "Remove unused volumes"
|
2016-11-03 18:48:30 -04:00
|
|
|
keywords: "volume, prune, delete"
|
2016-10-14 18:30:36 -04:00
|
|
|
---
|
2016-08-31 12:57:32 -04:00
|
|
|
|
2016-10-19 13:25:45 -04:00
|
|
|
<!-- This file is maintained within the docker/docker Github
|
|
|
|
repository at https://github.com/docker/docker/. Make all
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
will be rejected.
|
|
|
|
-->
|
|
|
|
|
2016-08-31 12:57:32 -04:00
|
|
|
# volume prune
|
|
|
|
|
|
|
|
```markdown
|
2016-10-10 11:07:32 -04:00
|
|
|
Usage: docker volume prune [OPTIONS]
|
2016-08-31 12:57:32 -04:00
|
|
|
|
|
|
|
Remove all unused volumes
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-f, --force Do not prompt for confirmation
|
|
|
|
--help Print usage
|
|
|
|
```
|
|
|
|
|
|
|
|
Remove all unused volumes. Unused volumes are those which are not referenced by any containers
|
|
|
|
|
|
|
|
Example output:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ docker volume prune
|
|
|
|
WARNING! This will remove all volumes not used by at least one container.
|
|
|
|
Are you sure you want to continue? [y/N] y
|
|
|
|
Deleted Volumes:
|
|
|
|
07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e
|
|
|
|
my-named-vol
|
|
|
|
|
|
|
|
Total reclaimed space: 36 B
|
|
|
|
```
|
|
|
|
|
|
|
|
## Related information
|
|
|
|
|
|
|
|
* [volume create](volume_create.md)
|
|
|
|
* [volume ls](volume_ls.md)
|
|
|
|
* [volume inspect](volume_inspect.md)
|
|
|
|
* [volume rm](volume_rm.md)
|
2016-10-17 12:04:52 -04:00
|
|
|
* [Understand Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
2016-08-31 12:57:32 -04:00
|
|
|
* [system df](system_df.md)
|
|
|
|
* [container prune](container_prune.md)
|
2016-10-10 11:26:05 -04:00
|
|
|
* [image prune](image_prune.md)
|
2016-10-18 00:36:52 -04:00
|
|
|
* [network prune](network_prune.md)
|
2016-08-31 12:57:32 -04:00
|
|
|
* [system prune](system_prune.md)
|