Skip to content

Instantly share code, notes, and snippets.

@asauber
Last active May 21, 2020 16:42
Show Gist options
  • Save asauber/fa1f67be6dbcab6662f813587f885304 to your computer and use it in GitHub Desktop.
Save asauber/fa1f67be6dbcab6662f813587f885304 to your computer and use it in GitHub Desktop.
Free up space used by Docker for Mac
#!/bin/bash
# Delete all unused image layers
docker system prune --all
# Delete all unused image layers non-interactive
docker system prune --all -f
# Run a container from Docker Inc. which cleans up the Virtual Machine
docker run --privileged --pid=host docker/desktop-reclaim-space
# Delete all unused image layers and volumes.
# Warning: This may delete anonymous storage volumes with your data on them
# docker system prune --all -f --volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment