← All notes

docker network prune: remove unused networks

Answer: docker network prune removes all unused networks. Unused networks are those which are not referenced by any containers. The --force flag does not prompt for confirmation.

What gets removed

The command will remove all unused networks.

Unused networks are those which are not referenced by any containers.

An example warning says this will remove all custom networks not used by at least one container.

The --filter option provides filter values, for example until equals a timestamp.

Options in the CLI reference

The CLI description also says to remove all unused networks.

Those unused networks are not referenced by any containers.

Filter values can be given, for example until=<timestamp>.

The --force flag, also written -f, does not prompt for confirmation.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker network prune; Docker CLI, docker network prune CLI reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker Docs, docker network prune; Docker CLI, docker network prune CLI reference. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Apache-2.0 (https://raw.githubusercontent.com/docker/cli/master/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:mbk8g8ed

iinventedlight. 2026. "docker network prune: remove unused networks." iinventedlight Library, iil:note:mbk8g8ed, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-network-prune/. License: CC-BY-4.0.

@misc{iil_note_mbk8g8ed,
  author = {{iinventedlight}},
  title = {{docker network prune: remove unused networks}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/docker-network-prune/},
  note = {Permanent ID iil:note:mbk8g8ed. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-network-prune.md.