Skip to content

Instantly share code, notes, and snippets.

@jottr
Last active January 3, 2016 03:19
Show Gist options
  • Select an option

  • Save jottr/8401211 to your computer and use it in GitHub Desktop.

Select an option

Save jottr/8401211 to your computer and use it in GitHub Desktop.
remove running docker containers.

docker ps -a lists all running containers.

Delete all containers with an exit state of 1

docker ps -a | grep Exit | awk '{print $1}' | xargs docker rm

Remove all containers, ignoring their current state

docker ps -a -q | xargs docker rm

If you observe stale NFS handles - reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment