Files
docker-cli/docs/reference/commandline/network_prune.md
Akihiro Suda 8f0be436cd add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:28 +00:00

46 lines
1.1 KiB
Markdown

---
title: "network prune"
description: "Remove unused networks"
keywords: [network, prune, delete]
---
# network prune
```markdown
Usage: docker network prune [OPTIONS]
Remove all unused networks
Options:
-f, --force Do not prompt for confirmation
--help Print usage
```
Remove all unused networks. Unused networks are those which are not referenced by any containers.
Example output:
```bash
$ docker network prune
WARNING! This will remove all networks not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Networks:
n1
n2
```
## Related information
* [network disconnect ](network_disconnect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network ls](network_ls.md)
* [network inspect](network_inspect.md)
* [network rm](network_rm.md)
* [Understand Docker container networks](../../userguide/networking/index.md)
* [system df](system_df.md)
* [container prune](container_prune.md)
* [image prune](image_prune.md)
* [volume prune](volume_prune.md)
* [system prune](system_prune.md)