Skip to content

Instantly share code, notes, and snippets.

@davewalk
Created March 14, 2015 23:42
Show Gist options
  • Save davewalk/f0ebc293d2131f301e53 to your computer and use it in GitHub Desktop.
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
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