Skip to content

Instantly share code, notes, and snippets.

@mixxen
Last active February 14, 2016 04:38
Show Gist options
  • Select an option

  • Save mixxen/cf61217d36e7d887f96c to your computer and use it in GitHub Desktop.

Select an option

Save mixxen/cf61217d36e7d887f96c to your computer and use it in GitHub Desktop.
Docker cleanup commands
#remove all stopped containers
docker rm $(docker ps -a -q)
#remove all untagged images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
#remove all images
docker rmi -f $(docker images -q)
#remove dockers by name
docker rmi $(docker images | grep KEYWORD | awk '{print $3}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment