Skip to content

Instantly share code, notes, and snippets.

@dgrebb
Forked from Jaid/dockerPurge.bash
Last active February 21, 2024 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgrebb/3d4063ed75e6cbbb3fa72fae1381a687 to your computer and use it in GitHub Desktop.
Save dgrebb/3d4063ed75e6cbbb3fa72fae1381a687 to your computer and use it in GitHub Desktop.
docker burn
#!/usr/bin/env bash
set -e
set -o errexit
docker stop `docker ps -qa` > /dev/null 2>&1; ## Stop all running containers
docker buildx stop; ## Stop the buildx builder
docker system prune --all --force --volumes; ## Remove all volumes, images, and containers
docker buildx rm --all-inactive --force; ## Remove all buildx builders
docker buildx prune --all --force; ## Prune buildx builder caches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment