← All notes

docker container rm: remove one or more containers

Answer: docker container rm, also called docker rm, removes one or more containers. --force uses SIGKILL to remove a running container. --volumes removes associated anonymous volumes. Use the docker container prune command to remove all stopped containers.

The command and its aliases

The usage line is docker container rm [OPTIONS] CONTAINER [CONTAINER...].

Aliases include docker container remove and docker rm.

The description is short: remove one or more containers.

Force, links, and volumes

The --force option force the removal of a running container and uses SIGKILL.

The --link option removes the specified link.

The --volumes option removes anonymous volumes associated with the container.

The docs show force-removing a running container: the main process receives SIGKILL, then the container is removed.

Use the docker container prune command to remove all stopped containers, or docker system prune to remove unused containers plus other unused Docker resources.

The CLI markdown reference

The --force option uses SIGKILL. The --volumes option removes anonymous volumes associated with the container.

It also repeats that --force uses SIGKILL, and that --volumes removes anonymous volumes associated with the container.

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 rm; Docker CLI, container rm command reference (source). 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 rm; Docker CLI, container rm command reference (source). 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:jhcjn7yw

iinventedlight. 2026. "docker container rm: remove one or more containers." iinventedlight Library, iil:note:jhcjn7yw, version of 2026-11-23. https://iinventedlight.com/library/notes/docker-rm/. License: CC-BY-4.0.

@misc{iil_note_jhcjn7yw,
  author = {{iinventedlight}},
  title = {{docker container rm: remove one or more containers}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-23},
  url = {https://iinventedlight.com/library/notes/docker-rm/},
  note = {Permanent ID iil:note:jhcjn7yw. 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-rm.md.