Created
June 2, 2014 13:09
-
-
Save martint17r/c7bbf24859a7859dceae to your computer and use it in GitHub Desktop.
Script to clean up docker leftovers periodically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# adapted from http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment