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
- id: C1 claim: docker rm removes one or more containers. source: S1 evidence: "Remove one or more containers"
- id: C2 claim: --force removes a running container with SIGKILL. source: S1 evidence: "Force the removal of a running container (uses SIGKILL)"
- id: C3 claim: --volumes removes associated anonymous volumes. source: S1 evidence: "Remove anonymous volumes associated with the container"
- id: C4 claim: The CLI source also documents SIGKILL on --force. source: S2 evidence: "Force the removal of a running container (uses SIGKILL)"
- id: C5 claim: The CLI source also documents --volumes for anonymous volumes. source: S2 evidence: "Remove anonymous volumes associated with the container"
Sources
- [S1] docker container rm. Docker Docs. https://docs.docker.com/reference/cli/docker/container/rm/ . License: Apache-2.0. Accessed 2026-11-23.
- [S2] container rm command reference (source). Docker CLI. https://raw.githubusercontent.com/docker/cli/master/docs/reference/commandline/container_rm.md . License: Apache-2.0. Accessed 2026-11-23.
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
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.},
}
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.
- docker-rm.schema.json (schema; CC-BY-4.0)
- docker-rm.table.json (table; CC-BY-4.0)
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.