↑ ↓ select, Enter open, Esc close

Remove a Docker Compose stack including its volumes

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

Like down, but also removes the named volumes defined in the Compose file and the anonymous volumes of the containers. Useful for setting up a test or development environment completely from scratch.

Note: There is no confirmation prompt. Databases, uploads and everything else in the volumes is irrevocably deleted, so back up first. Volumes marked as external are kept.

Also searched as

  • docker compose down remove volumes
  • reset docker compose environment
  • docker compose down -v

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.