docker-compose down Explained

What docker-compose down does, with an example.

Published November 8, 2026

docker compose down stops and removes the containers and networks created by up. Volumes are kept unless you add -v.

How it works

It is the clean reverse of up. Use --remove-orphans to delete containers for services no longer in the file.

Adding -v deletes named volumes, including database data.

Try it

docker compose down
✔ Container app-web-1 Removed
✔ Network app_default Removed

Practical examples

Stop and remove

docker compose down

Also delete volumes (data loss!)

docker compose down -v

Remove orphans

docker compose down --remove-orphans

Just stop

docker compose stop

Common mistakes

  • Using -v and wiping the database.
  • Expecting down to remove images.
  • Confusing down with stop.

Key takeaways

  • docker compose down stops and removes the containers and networks created by up.
  • Run docker <command> --help for all options.
  • Clean up unused resources regularly.

FAQ

down vs stop?

stop keeps containers; down removes them.

Where can I see all options?

Run the command with --help.

More General articles