Skip to content

Instantly share code, notes, and snippets.

@dorosch
Created October 25, 2019 22:19
Show Gist options
  • Save dorosch/001f8a956d2e114bc99f4a022ea7fb4b to your computer and use it in GitHub Desktop.
Save dorosch/001f8a956d2e114bc99f4a022ea7fb4b to your computer and use it in GitHub Desktop.
#!/bin/bash
docker container ls | awk '{print $1}' | xargs docker container stop 2> /dev/null
docker rm $(docker ps -a -q) 2> /dev/null
docker images | awk '$1 == "<none>" {print $3}' | xargs docker rmi -f 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment