Skip to content

Instantly share code, notes, and snippets.

@fdavidcl
Created March 22, 2019 09:14
Show Gist options
  • Save fdavidcl/9d8081f9fe6b1597e4c7f29fbaf3c2a1 to your computer and use it in GitHub Desktop.
Save fdavidcl/9d8081f9fe6b1597e4c7f29fbaf3c2a1 to your computer and use it in GitHub Desktop.
Clean Docker containers and images
# WARNING: This will remove all your Docker containers and images
# Run only the second line to remove images unused by any running or stopped container
docker rm (docker container ls -a --format "{{.Names}}")
docker rmi (docker image ls --format "{{.ID}}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment