Skip to content

Instantly share code, notes, and snippets.

@giufus
Last active December 14, 2016 13:57
Show Gist options
  • Save giufus/4a34d6b8c3e43d621a9de4c04480fe75 to your computer and use it in GitHub Desktop.
Save giufus/4a34d6b8c3e43d621a9de4c04480fe75 to your computer and use it in GitHub Desktop.
remove all docker container
#!/bin/bash
# Delete all containers
sudo docker rm $(sudo docker ps -a -q)
# Delete all images
sudo docker rmi $(sudo docker images -q)
#sudo docker ps -a | sed -n '1!p' | cut -d' ' -f 1 | xargs sudo docker rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment