docker compose down

Stop and remove containers, networks, and optionally volumes created by compose up.

Syntax

docker compose down [OPTIONS]

Examples

Example 1
docker compose down

Stop and remove containers and networks.

Example 2
docker compose down -v

Also remove volumes.

Example 3
docker compose down --rmi all

Remove containers and images used by services.

Common flags

FlagDescription
-v, --volumesRemove named volumes
--rmiRemove images (local, all)
-t, --timeoutTimeout in seconds

Tips & best practices

Related commands

View full Docker cheatsheet →