Skip to content

Instantly share code, notes, and snippets.

@michaloo
Created August 12, 2014 08:33
Show Gist options
  • Save michaloo/89c56c256e8f1ae58e00 to your computer and use it in GitHub Desktop.
Save michaloo/89c56c256e8f1ae58e00 to your computer and use it in GitHub Desktop.
Remove orphaned docker containers directories
cd /var/lib/docker/containers/ && ls . | grep -vE "($(docker ps -aq | paste -sd "|"))" | xargs rm -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment