Few things are more frustrating on a MacBook than opening System Settings > General > Storage and finding 80 GB or more consumed by an anonymous grey bar labeled System Data. This bloated storage is rarely caused by essential operating system files; in almost every case, it is driven by orphaned APFS local snapshots, developer caches, and runaway log files.
The Culprit: Hidden APFS Local Snapshots
When Time Machine is enabled, macOS automatically takes hourly snapshots of your entire APFS (Apple File System) drive. If your external backup drive is disconnected, macOS keeps these snapshots on your internal SSD, marking the storage as "purgeable."
However, the operating system often fails to release this space when large applications or updates require it. You can inspect and delete these snapshots via Terminal:
# 1. List all active APFS local snapshots:
tmutil listlocalsnapshots /
# Output Example:
com.apple.TimeMachine.2026-10-24-142301.local
com.apple.TimeMachine.2026-10-25-091512.local
# 2. Delete individual snapshots to reclaim space instantly:
sudo tmutil deletelocalsnapshots 2026-10-24-142301
# 3. Purge all local snapshots at once:
for d in $(tmutil listlocalsnapshotdates / | grep "-"); do sudo tmutil deletelocalsnapshots $d; done
Purging Massive Developer & Build Caches
If you use Xcode, Docker, or Node.js, developer caches accumulate gigabytes of unindexed files:
| Directory |
Typical Size |
Safe Terminal Deletion Command |
| Xcode DerivedData |
10 - 40 GB |
rm -rf ~/Library/Developer/Xcode/DerivedData/* |
| iOS Device Support Symbols |
15 - 30 GB |
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/* |
| User Caches Folder |
5 - 20 GB |
rm -rf ~/Library/Caches/* |
| Docker Desktop Virtual Disk |
30 - 80 GB |
docker system prune -a --volumes |
Finding Rogue Runaway Log Files with du
Occasionally, a crashed background service writes error logs into /private/var/log millions of times per hour, creating 50 GB log files. Identify the largest directories on your drive with this terminal command:
# Scan root drive and sort top 10 largest folders (Run with sudo):
sudo du -sh /Users/* /Library /System /private/var 2>/dev/null | sort -hr | head -n 10
Clearing Sleepimage Files on Laptops
When your MacBook goes to sleep, macOS writes active RAM contents to an internal file named sleepimage. On a 32 GB MacBook, this single file occupies 32 GB of SSD space:
# Check sleepimage size:
ls -lh /private/var/vm/sleepimage
# Safely purge sleepimage and disable disk dumping:
sudo rm -rf /private/var/vm/sleepimage
sudo pmset -a hibernatemode 0
Frequently Asked Questions
Will deleting files in ~/Library/Caches damage my Mac?
No. Cache files contain temporary data that applications regenerate automatically as needed. Make sure to quit active applications before clearing the folder.
Why didn't my storage number update immediately after deleting files?
APFS allocates space asynchronously. Restart your Mac or open Disk Utility and run First Aid on your container to force APFS free-space recalculation.