Home / Guides / What Is Inside System Data on Mac: A Terminal Audit
What is inside System Data on Mac: a Terminal audit
Quick answer: System Data is not one folder. Run a handful of read-only du commands and add up the results. The big ones are almost always ~/Library/Caches, ~/Library/Application Support, ~/Library/Developer and ~/.cache.
Before you start
- Everything below only reads sizes. Nothing is deleted.
- System locations ask for your administrator password because of
sudo. Operation not permittedon some folders is normal: macOS protects them.- Sizes here use
du, which counts the space really used on disk.
Step 1: your user Library
du -sh ~/Library/Caches ~/Library/Application\ Support ~/Library/Developer ~/Library/Containers ~/Library/Logs 2>/dev/null
Step 2: tool folders in your home directory
du -sh ~/.cache ~/.npm ~/.gradle ~/.cargo ~/.docker 2>/dev/null
Step 3: system-wide locations
sudo du -sh /Library/Caches /private/var/log /private/var/vm 2>/dev/null
Step 4: the whole data volume, folder by folder
sudo du -xhd 1 /System/Volumes/Data 2>/dev/null | sort -h | tail -15
The -x flag stays on one volume so nothing is counted twice.
Step 5: snapshots
tmutil listlocalsnapshots /
diskutil apfs listSnapshots /
A real example
These are the results from one developer's Mac:
| Location | Size |
|---|---|
| ~/Library/Caches | 31 GB |
| ~/Library/Developer | 9.8 GB |
| ~/Library/Application Support | 7.8 GB at the time |
| ~/.cache | 4.5 GB |
| ~/Library/Containers | 2.0 GB |
| /private/var/vm (swap) | 2.0 GB |
| ~/.npm | 1.4 GB |
| /Library/Caches | 120 MB |
| /private/var/log | 85 MB |
| ~/Library/Logs | 15 MB |
And the data volume by top-level folder: Users 135 GB, Applications 46 GB, System 28 GB, Library 13 GB, private 7 GB, opt 4.5 GB, usr 1 GB and a 210 MB hidden .fseventsd, about 234 GB in total. Storage settings on the same Mac said roughly 340 GB used. The gap is the part files alone do not explain: other volumes in the same APFS container (the sealed system volume alone was 13.7 GB), snapshots and metadata.
Turn the numbers into actions
| If this is big | Read |
|---|---|
| ~/Library/Caches | Is it safe to delete ~/Library/Caches |
| ~/Library/Developer | Clearing Xcode DerivedData |
| ~/Library/Application Support | Application Support too big |
| Docker data in Containers | Docker.raw looks huge |
| Snapshots | Deleting local snapshots |
| Swap and system logs | Leave them alone. macOS manages them |
If you would rather see all of this at a glance, See Your Disk runs the same measurement and draws it as a map, with whatever no folder explains shown as its own System Data block. The full cleanup order is in how to clear System Data safely.
A map of your Mac's disk, and a safe way to clean it.
Frequently asked questions
Why do the numbers not add up to what Storage settings says?
Files you can measure are only part of used space. The rest is other volumes in the same APFS container, snapshots, purgeable space and metadata. On the Mac below, the files on the data volume added up to about 234 GB while Storage settings reported roughly 340 GB used.
Do I need sudo for these commands?
Only for system locations such as /Library and /private. Commands on folders in your own home folder do not need it.
Are these commands safe?
Yes. du, ls, tmutil list and diskutil list only read sizes and names. Nothing in this guide deletes anything.
What is /private/var/folders?
A set of per-user temporary and cache folders that macOS manages. Do not delete things there by hand.
Related guides
- What is System Data on Mac, and why is it so big?: What the grey bar in Storage settings contains, why it grows and why its size jumps around.
- How to clear System Data on Mac safely: Step-by-step, from safest to most effort, with the Terminal commands and the things you should not delete.
- Application Support is too big on Mac: what you can delete: What is safe to remove in Application Support and what is your data, with examples from a real Mac.
- How to see what is taking up space on your Mac: From Storage settings to Terminal to treemap apps: ways to find what fills your Mac and when to use each.