Skip to content

Instantly share code, notes, and snippets.

@Mazuh
Last active August 12, 2020 13:01
Show Gist options
  • Save Mazuh/bdab49209019d97ef991cbe1d8eeb718 to your computer and use it in GitHub Desktop.
Save Mazuh/bdab49209019d97ef991cbe1d8eeb718 to your computer and use it in GitHub Desktop.
Clear Docker artifacts.
docker volume ls -q -f dangling=true
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -q)
docker volume rm `docker volume ls -q -f dangling=true`
docker stop $(docker ps -aq)
docker system prune
# WARNING! This will remove:
# - all stopped containers
# - all networks not used by at least one container
# - all dangling images
# - all dangling build cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment