Skip to content

Instantly share code, notes, and snippets.

@boris
Created April 24, 2017 13:14
Show Gist options
  • Save boris/b9231a7beae806943e490ebbec65eeb4 to your computer and use it in GitHub Desktop.
Save boris/b9231a7beae806943e490ebbec65eeb4 to your computer and use it in GitHub Desktop.
Small script to remove containers in 'Exited' state.
#!/bin/bash
FIND=`docker ps -a | grep Exited | awk '{print $1}'`
for i in $FIND;
do
docker rm $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment