Sub topic 3
Understanding Categories and System Data
This chapter assumes you can open System Settings and browse Finder. It also assumes you know your home folder and the hidden ~/Library folder. Terminal commands appear in the second half. You can skip them and still follow the main ideas.
What the category bar shows
Open System Settings > General > Storage. At the top is a colored bar. Each color is a category, and the bar's total length is the capacity of your startup disk. Below the bar is a list of the same categories, each with a size.
macOS builds these categories by classifying files by type and location. Photos in the Photos library count as Photos. Files under /Applications count as Applications. Anything macOS cannot place in a named category goes into System Data.
Many categories have an (i) button on their row. It shows a breakdown, and for some categories it offers a Delete or Reduce action.
The common categories
The exact list changes with your macOS version and with what you have installed. These are the ones you will meet most often.
| Category | What it counts | Can you act on it here? |
|---|---|---|
| Applications | Apps in `/Applications` and your user Applications folder | Yes, you can review and remove apps |
| Documents | Files in Documents, Desktop, Downloads, and other user files, including large files and downloads | Yes, you can review large files and downloads |
| iCloud Drive | The local copy of files synced from iCloud Drive | Indirectly, through Optimize Mac Storage |
| Photos | The Photos library, including originals and thumbnails | Only inside the Photos app |
| Messages | Message history and attachments | Yes, through the Messages detail view |
| Mail messages, attachments, and downloads | Partly, through Mail settings | |
| Music, TV, Books, Podcasts | Media you downloaded or imported | Partly |
| Developer | Xcode, simulators, and related tools, if installed | Partly |
| macOS | The operating system itself | No |
| Trash | Files you deleted but have not emptied | Yes, empty it |
| System Data | Everything not placed in another category | Not directly |
Two of these rows behave differently from the rest.
- macOS is the operating system. It lives on a sealed, read-only system volume. You cannot shrink it by deleting files, and you should not try.
- System Data is a catch-all, covered below.
Why System Data is large and vague
System Data is a leftover bucket, not a folder you can open. macOS computes it as the used space that no other category claimed. That is why the number can be surprising, and why it can change without any action from you.
System Data commonly includes:
- Caches. Temporary copies of data that apps and the system keep to work faster. Chapter sections later in this tutorial cover these in detail.
- Logs and diagnostic reports. Text records written by the system and by apps.
- Spotlight and other indexes. Databases that make search fast.
- Virtual memory swap files. When RAM fills up, macOS writes memory contents to disk under
/private/var/vm. - Time Machine local snapshots. Point-in-time copies of your files kept on the startup disk. On some macOS versions these appear here.
- Application support data. Plugins, fonts, extensions, and databases that apps keep in
~/Library/Application Support. - Device backups. Local iPhone and iPad backups, depending on your macOS version.
- Virtual machines and disk images. Large container files that macOS cannot look inside to classify.
Normal use of the Mac keeps adding to this list. A System Data figure of 20 to 40 GB is common on a healthy Mac. A figure of several hundred GB points to a specific cause, such as a runaway cache, a virtual machine, or a large backup.
Why the numbers do not add up cleanly
You may notice that the category sizes do not match what Finder reports for the same folders. Several things cause this.
- Different methods. Storage settings uses system metadata and its own classification. Finder's Get Info adds up file sizes by walking a folder.
- Shared space. Your Data volume shares free space with other volumes in the same APFS container. APFS is the Mac's file system, and it allocates space to volumes on demand. A category figure describes used space, and the free figure depends on the whole container.
- Cloud placeholders. A file that lives in iCloud and is not downloaded takes almost no local space, even though Finder may show its full size.
- Clones and sparse files. APFS can store two copies of a file with the same underlying blocks. Both appear at full size in Finder, but they take less space on disk.
- Delayed calculation. After a large change, Storage settings can show stale numbers for a few minutes while it recalculates. A bar that is still loading is not a reliable reading.
> Note: this list uses plain text on purpose; the next callout carries the practical advice.
Looking inside System Data from Terminal
macOS does not let you click into System Data, but you can find its biggest contributors. The commands below only read sizes. They delete nothing.
Start with an overview of the data volume and your home folder:
df -h /System/Volumes/Data
du -h -d 1 ~ 2>/dev/null | sort -hr | head -n 10The first command shows total, used, and available space. The second lists the ten largest first-level folders in your home folder, largest first. In most cases ~/Library ranks near the top, because it holds caches, logs, and application support data.
Next, measure the usual System Data suspects in your user account:
du -sh ~/Library/Caches 2>/dev/null
du -sh ~/Library/Logs 2>/dev/null
du -sh ~/Library/Application\ Support 2>/dev/null
du -sh ~/Library/Containers 2>/dev/nullThen check swap files and local snapshots:
ls -lh /private/var/vm 2>/dev/null
tmutil listlocalsnapshots /Swap files named swapfile0, swapfile1, and so on are managed by macOS. Their size depends on memory pressure, and they are removed when no longer needed. An empty snapshot list means snapshots are not contributing. A list with entries means Time Machine is holding local copies that macOS releases when it needs the space.
Some folders return permission errors unless Terminal has Full Disk Access. If you see Operation not permitted, the figure you got is incomplete. Add Terminal under System Settings > Privacy & Security > Full Disk Access if you want complete readings, then restart Terminal.
Reading the result: which causes matter
Once you have measured, use a rough decision guide.
| Finding | Likely cause | Reasonable response |
|---|---|---|
| `~/Library/Caches` is many GB | One or more apps keep large caches | Review per app, as covered in the caches sections |
| `~/Library/Application Support` is large | App data, possibly a database or a VM | Identify the app. Clean up inside the app if it offers it |
| Snapshots listed | Time Machine local snapshots | Usually leave them. macOS reclaims them when space is needed |
| Large swap files | Heavy memory use | Quit memory-hungry apps. Restart to clear swap |
| Large `.vmwarevm`, `.pvm`, or `.dmg` files | Virtual machines or disk images | Delete only the ones you no longer use |
| Small user folders but big System Data | Space not visible from your account | Wait for recalculation. Restart and check again |
The last row matters. Some System Data lives outside your home folder, in places such as /private/var or /Library, and a normal du of your home folder will not show it. If your home folder accounts for far less than System Data reports, restarting the Mac is a safe first step. It clears temporary files and swap, and it triggers a fresh calculation.
Common mistakes
- Deleting system folders to shrink System Data. Removing items from
/System,/Library, or/private/varcan break macOS. System Protection blocks many of these deletions for good reason, and you should not try to work around it. - Using "cleaner" apps that promise to wipe System Data. The category is not a pile of junk. Much of it is active data that apps or the system will rebuild, slowly, or lose.
- Reading a single snapshot of the bar. The figure moves as macOS creates and releases snapshots and caches. Compare numbers taken under similar conditions, for example after a restart.
- Confusing System Data with macOS. The macOS row is fixed. System Data is the part that moves.
Summary of the working model
Storage settings sorts used space into named categories by file type and location. Whatever it cannot classify lands in System Data. That bucket mixes disposable items (caches, logs, swap) with real data (application support files, backups, virtual machines). You inspect it from the outside, by measuring folders with Terminal, and you decide per item. The next chapters cover how purgeable space changes the free-space figure, and how to clear caches safely.
Exercise
Your Storage settings show System Data at 180 GB. du -h -d 1 ~ shows ~/Library at 12 GB, and tmutil listlocalsnapshots / returns no snapshots. What is a sensible next step, and why should you avoid deleting folders under /private/var in the meantime?
Show answer
Restart the Mac and check Storage settings again. A restart clears swap and temporary files and forces a fresh calculation, and the figure may be stale. If it stays high, look outside your home folder and for large virtual machines, disk images, or device backups, using Full Disk Access in Terminal if needed. Avoid deleting under /private/var because it holds system-managed data such as swap, databases, and logs that macOS needs. Removing it can cause instability or data loss, and the figure will not reliably drop.
Exercise
Why can the category sizes in Storage settings differ from the size Finder shows for the same folder? Give two reasons.
Show answer
Any two of these: Storage settings classifies files with its own metadata and rules, while Finder adds up file sizes in a folder. iCloud files that are not downloaded show full size in Finder but take little local space. APFS clones share blocks, so the real space used is smaller than the sum of file sizes. Storage settings can also display stale numbers until it finishes recalculating.