Interview Q&A / Docker & Kubernetes

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is the difference between docker compose stop, down and down -v?

SHORT ANSWER

stop halts containers but keeps them. down stops and removes containers and networks. down -v also deletes the named volumes, which destroys stored data.

Explain it simply

Three levels of closing a shop. stop pulls down the shutters; everything is inside, ready to reopen. down clears the shop and removes the signboard but leaves the storeroom. down -v also empties the storeroom.

docker compose stop halts services; start brings the same containers back. docker compose down removes the containers and the project's networks, so the next up creates fresh containers. Named volumes remain, so a database keeps its data. Adding -v deletes volumes declared in the compose file too, and --rmi all additionally removes images.

A developer who wants a clean database for tests uses down -v. A developer who wants to keep data uses plain down or stop.

Example

bash
docker compose stop          # containers kept, stopped
docker compose start         # same containers resume
docker compose down          # containers + networks removed, volumes kept
docker compose down -v       # also deletes volumes (data loss)

What to say in the interview

"stop only halts containers. down removes containers and networks but keeps volumes. down -v also removes the volumes, so I use it only when I want a clean slate."

Common mistakes

  • Running down -v on a stack whose volume holds real data.

#docker-compose#commands#volumes

Related questions

Practise more Docker & Kubernetes questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Docker & Kubernetes quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.