Skip to content

Instantly share code, notes, and snippets.

@AdnaneX
Forked from TheMoroccan09/docker-clear.sh
Created October 13, 2018 03:12
Show Gist options
  • Save AdnaneX/1a206aea6808bfe8a1d10b403f9946b2 to your computer and use it in GitHub Desktop.
Save AdnaneX/1a206aea6808bfe8a1d10b403f9946b2 to your computer and use it in GitHub Desktop.
#!bin/bash
DOCKER_PIDS=$(docker ps -a -q)
if [ -n "$DOCKER_PIDS" ]; then
docker stop $DOCKER_PIDS && docker rm $DOCKER_PIDS
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment