docker compose down

Stops and removes the containers and networks a Compose project created.

In more detail

Volumes are kept unless you add -v (or --volumes), which also deletes named volumes and all their data. In tests, docker compose down -v gives every run a clean start; in development, leave -v off to keep your database.

Example

docker compose down -v

Related terms

Taught in

References