Skip to content

Instantly share code, notes, and snippets.

@mauricionobrega
Created July 19, 2019 18:08
Show Gist options
  • Save mauricionobrega/031c8c6020ce4051ee34f5e99877f607 to your computer and use it in GitHub Desktop.
Save mauricionobrega/031c8c6020ce4051ee34f5e99877f607 to your computer and use it in GitHub Desktop.
# http://blog.baudson.de/blog/stop-and-remove-all-docker-containers-and-images
# List all containers (only IDs)
alias dockerListContainers='docker ps -aq'
# Stop all running containers
alias dockerStopContainers='docker stop $(docker ps -aq)'
# Remove all containers
alias dockerRemoveAllContainers='docker rm $(docker ps -aq)'
# Remove all images
alias dockerRemoveAllImages='docker rmi $(docker images -q)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment