Skip to content

Docker network pruning

Docker network pruning is a maintenance operation used to remove all unused networks from a Docker host.^[400-devops-03-containerization-readme.md]

Usage

To execute this operation and remove all networks that are not currently in use by containers, the following command is used:^[400-devops-03-containerization-readme.md]

docker network prune

This command is part of a broader set of "prune" commands available in Docker, such as those for removing unused volumes (docker volume prune).^[400-devops-03-containerization-readme.md]

Sources

^[400-devops-03-containerization-readme.md]