docker compose down
all
Stop and remove containers, networks, images, and volumes created by `docker compose up`.
More info →Options (3)
-v, --volumesbooleanStop and remove containers, networks, and all volumes
Example:
docker compose down {{[-v|--volumes]}}-f, --filebooleanStop and remove containers using an alternate compose file
Example:
docker compose {{[-f|--file]}} {{path/to/config}} down-t, --timeoutbooleanStop and remove containers with a custom timeout in seconds
Example:
docker compose down {{[-t|--timeout]}} {{timeout}}Examples (8)
Stop and remove all containers and networks
Stop and remove containers, networks, and all images used by services
docker compose down --rmi allStop and remove containers, networks, and only images without a custom tag
docker compose down --rmi localStop and remove containers, networks, and all volumes
docker compose down [-v|--volumes]Stop and remove everything including orphaned containers
docker compose down --remove-orphansStop and remove containers using an alternate compose file
docker compose [-f|--file] path/to/config downStop and remove containers with a custom timeout in seconds
docker compose down [-t|--timeout] timeoutRemove containers for services not defined in the Compose file
docker compose down --remove-orphans [-v|--volumes]made by @shridhargupta | data from tldr-pages