docker-container-rm
remove one or more containers
TLDR
SYNOPSIS
docker container rm [options] container [container...]
DESCRIPTION
docker container rm removes one or more containers from the Docker host, freeing disk space occupied by the container's read-write layer and metadata. Containers must be stopped before removal unless the -f flag is used to force removal of running containers.The -v option also removes anonymous volumes associated with the container, which is useful for complete cleanup. Named volumes are preserved by default to prevent accidental data loss.The shorthand docker rm is equivalent to docker container rm.
PARAMETERS
-f, --force
Force the removal of a running container (uses SIGKILL).-v, --volumes
Remove anonymous volumes.-l, --link
Remove the specified inter-container network link rather than the container itself.
CAVEATS
Forcing removal of a running container with -f sends SIGKILL without giving the process a chance to clean up. To prune all stopped containers in one step use docker container prune.
SEE ALSO
docker-rm(1), docker-container(1)
