Filesystem Usage
Show filesystem usage:
1df -hShow filesystem usage for root volume:
1df -h /Top-Level Directories
Show largest directories on the root filesystem:
1sudo du -xhd 1 / | sort -hShow largest directories in your home folder:
1du -hd 1 ~ | sort -hShow largest directories in Library:
1du -hd 1 ~/Library | sort -hDrill Down Into Large Folders
Application Support:
1du -hd 1 ~/Library/Application\ Support | sort -hCaches:
1du -hd 1 ~/Library/Caches | sort -hContainers:
1du -hd 1 ~/Library/Containers | sort -hGroup Containers:
1du -hd 1 ~/Library/Group\ Containers | sort -hCloud Storage:
1du -hd 1 ~/Library/CloudStorage | sort -hDeveloper:
1du -hd 1 ~/Library/Developer | sort -hDownloads:
1du -hd 1 ~/Downloads | sort -hDocuments:
1du -hd 1 ~/Documents | sort -hLargest Files
Find files larger than 1 GB:
1find ~ -type f -size +1G -exec ls -lh {} \;Find files larger than 5 GB (whole disk):
1sudo find / -type f -size +5G 2>/dev/nullTop 50 largest files in home directory:
1find ~ -type f -exec du -h {} + 2>/dev/null | sort -hr | head -50Largest Directories
Top 50 largest directories:
1find ~ -type d -exec du -sh {} + 2>/dev/null | sort -hr | head -50Time Machine
List local snapshots:
1tmutil listlocalsnapshots /List snapshot dates:
1tmutil listlocalsnapshotdatesDocker
Disk usage:
1docker system dfDetailed usage:
1docker system df -vRemove unused objects:
1docker system pruneRemove everything unused (including volumes):
1docker system prune -a --volumespnpm
Show store path:
1pnpm store pathShow store size:
1du -sh "$(pnpm store path)"Remove unused packages:
1pnpm store pruneHomebrew
Cache size:
1du -sh ~/Library/Caches/HomebrewCleanup:
1brew cleanupRemove old downloads:
1brew cleanup -sXcode
Developer folder:
1du -hd 1 ~/Library/Developer | sort -hDerivedData:
1du -sh ~/Library/Developer/Xcode/DerivedDataDelete DerivedData:
1rm -rf ~/Library/Developer/Xcode/DerivedData/*List installed simulators:
1xcrun simctl listDelete unavailable simulators:
1xcrun simctl delete unavailableGoogle Drive / Cloud Storage
Cloud storage usage:
1du -hd 1 ~/Library/CloudStorage | sort -hList providers:
1ls ~/Library/CloudStorageShow total size:
1du -sh ~/Library/CloudStorage/*APFS Snapshots
List APFS snapshots:
1diskutil apfs listSnapshots /Mounted Volumes
List mounted disks:
1diskutil listDetailed APFS information:
1diskutil apfs listCaches
Show cache sizes:
1du -hd 1 ~/Library/Caches | sort -hSystem caches:
1sudo du -xhd 1 /Library/Caches | sort -hQuick Summary
Top-level home usage:
1du -hd 1 ~ | sort -hTop-level Library usage:
1du -hd 1 ~/Library | sort -hLargest files:
1find ~ -type f -size +1G -exec ls -lh {} \;Filesystem usage:
1df -hDocker usage:
1docker system dfpnpm cleanup:
1pnpm store pruneHomebrew cleanup:
1brew cleanupTip
If du reports "Operation not permitted", grant your terminal Full Disk Access:
System Settings → Privacy & Security → Full Disk Access
Then restart the terminal and rerun the commands.