↑ ↓ select, Enter open, Esc close

Stop and remove a Docker Compose stack

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
docker compose -f /opt/app/compose.yaml down

Shuts down the complete stack and removes the containers as well as the networks created by the project. Named volumes are kept, so a later docker compose up -d starts with the existing data.

Note: Data that only existed in a container’s writable layer is lost. To just pause, use docker compose stop, which keeps the containers.

Also searched as

  • docker compose down
  • stop docker compose stack
  • shut down compose project keep data

Related one-liners

All in Docker

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.