docker-delete-images 215 B

123456789
  1. #!/bin/bash
  2. if [ "x$1" = "x--YES" ]; then
  3. sudo docker rm $(sudo docker ps -a -q)
  4. sudo docker rmi $(sudo docker images -a -q)
  5. else
  6. echo "ARE YOU SURE YOU WANT TO DO THIS?"
  7. echo "If so, re-run with --YES"
  8. fi