Skip to content

Instantly share code, notes, and snippets.

@masimplo
Last active October 23, 2016 17:03
Show Gist options
  • Select an option

  • Save masimplo/409d92796276d9f032c274bf8e2e1986 to your computer and use it in GitHub Desktop.

Select an option

Save masimplo/409d92796276d9f032c274bf8e2e1986 to your computer and use it in GitHub Desktop.
Docker commands
# Remove all images
docker rmi $(docker images -q)
# Remove all untagged images
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
# Remove all running containers
docker rm -f $(docker ps -a -q)
# Remove all tangling volumes
docker volume rm $(docker volume ls -qf dangling=true)
# if cannot remove image due to repository conflict (two tags have same image id) first do
docker rmi {REPOSITORY_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment