Skip to content

Instantly share code, notes, and snippets.

@tonymontaro
Created October 10, 2018 08:27
Show Gist options
  • Select an option

  • Save tonymontaro/7c1696ddb7cca5a86f1be8299e1534ed to your computer and use it in GitHub Desktop.

Select an option

Save tonymontaro/7c1696ddb7cca5a86f1be8299e1534ed to your computer and use it in GitHub Desktop.
# I have a helper function to nuke everything docker, erm... continuously. Basically it boils down to the following:
# To clear containers:
docker rm -f $(docker ps -a -q)
# To clear images:
docker rmi -f $(docker images -a -q)
# To clear volumes:
docker volume rm $(docker volume ls -q)
# To clear networks:
docker network rm $(docker network ls | tail -n+2 | awk '{if($2 !~ /bridge|none|host/){ print $1 }}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment