Skip to content

Instantly share code, notes, and snippets.

@ilhamsj
Last active November 14, 2025 15:31
Show Gist options
  • Select an option

  • Save ilhamsj/32938fd32b4d1deb90168c39ccc378f4 to your computer and use it in GitHub Desktop.

Select an option

Save ilhamsj/32938fd32b4d1deb90168c39ccc378f4 to your computer and use it in GitHub Desktop.
# Check Docker disk usage
docker system df
# Check home directory size
du -sh ~
# Check largest directories in home
du -sh ~/* | sort -hr | head -20
# Check Documents directory
du -sh ~/Documents/* | sort -hr | head -10
# Check Library directory
du -sh ~/Library/* | sort -hr | head -10
# Check github directory
du -sh ~/github/* | sort -hr | head -10
# Check cache locations
du -sh ~/.npm ~/.pnpm-store ~/.cache ~/Library/Caches
# Check Docker containers
du -sh ~/Library/Containers/* | sort -hr | head -10
# Check pnpm store details
du -sh ~/Library/pnpm/store/*
# Clear pnpm store (~5.9GB)
rm -rf ~/Library/pnpm/store/*
# Prune unused Docker resources (images, containers, volumes, networks)
docker system prune -a --volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment