← Learn
Dangerous
docker rm -f $(docker ps -aq)

cross-platform · bash · Intermediate

Force-removes every container on the host, including running ones. The command substitution expands to all container ids, so the blast radius is the whole machine rather than the one container you were debugging.

Signals to notice

  • Command substitution expands to every container
  • Force flag kills running workloads
  • Unnamed, unbounded target list

Think you can spot these under time pressure?

Start Training

More Docker