← Learn
Dangerous
docker volume rm $(docker volume ls -q)

cross-platform · bash · Beginner

Removes every Docker volume on the host. Volumes are where containers keep the data that is supposed to outlive them, so this deletes exactly the state that stopping a container was designed to preserve.

Signals to notice

  • the subshell expands to every volume id on the host
  • volumes hold the persistent data containers are not supposed to lose

Think you can spot these under time pressure?

Start Training

More Docker