Skip to content

Instantly share code, notes, and snippets.

@jalogut
Last active May 1, 2024 21:21
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jalogut/489b0264f9c5bfcea2c7ac68275c4ced to your computer and use it in GitHub Desktop.
Save jalogut/489b0264f9c5bfcea2c7ac68275c4ced to your computer and use it in GitHub Desktop.
Cheat sheet to check disk usage on docker. Identify what takes most of your space

Total disk size configuration (Mac)

ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Total disk usage (Mac)

du -h ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Detailed disk usage

docker system df

Space used by each container, image and volume

docker system df -v

Filter only >= 1GB

docker system df -v | grep GB

Space used by running containers

docker ps -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment