← All notes

docker container prune: remove all stopped containers

Answer: docker container prune will remove all stopped containers. --force means do not prompt for confirmation. --filter can use until=<timestamp>.

What gets removed

This will remove all stopped containers.

Pass --force so the command does not prompt for confirmation.

--force means do not prompt for confirmation.

Filters

The --filter flag format is key=value. If there is more than one filter, pass multiple flags.

When multiple filters are provided, a container must satisfy all filter conditions to be pruned.

For one key, a container is pruned if it matches any of the values for that key.

The until filter can limit removal to containers created before a given timestamp.

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 container prune; Docker CLI, docker container 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 container prune; Docker CLI, docker container 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:18zxvg8c

iinventedlight. 2026. "docker container prune: remove all stopped containers." iinventedlight Library, iil:note:18zxvg8c, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-container-prune/. License: CC-BY-4.0.

@misc{iil_note_18zxvg8c,
  author = {{iinventedlight}},
  title = {{docker container prune: remove all stopped containers}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/docker-container-prune/},
  note = {Permanent ID iil:note:18zxvg8c. 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-container-prune.md.