gdritter repos GRUtils / master scripts / docker-delete-images
master

Tree @master (Download .tar.gz)

docker-delete-images @master

5812ac2
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
#!/bin/bash

if [ "x$1" = "x--YES" ]; then
  sudo docker rm $(sudo docker ps -a -q)
  sudo docker rmi $(sudo docker images -a -q)
else
  echo "ARE YOU SURE YOU WANT TO DO THIS?"
  echo "If so, re-run with --YES"
fi