Created
March 14, 2015 23:42
-
-
Save davewalk/f0ebc293d2131f301e53 to your computer and use it in GitHub Desktop.
Remove old Docker containers in bulk that from "weeks ago". Can obviously be edited to delete on a different string. Originally from https://twitter.com/jpetazzo/status/347431091415703552 via http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers
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
docker ps -a | grep "weeks ago" | awk '{print $1}' | xargs docker rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment