Sub topic 1
How your Mac uses its disk
Before you can free up space on a Mac, you need to know what the numbers describe. Storage tools report totals, used space, and available space. Those figures depend on how macOS divides a disk, and this chapter covers that division. It explains why two tools can disagree about the same disk, and it shows you how to look at the layout yourself. Later chapters use this model to read the Storage settings pane, understand purgeable space, and clean up safely.
Prerequisites
This chapter assumes you can:
- Open System Settings and Finder, and move around your home folder.
- Recognize the Library folder inside your home folder (
~/Library) as a place where apps keep support files. - Optionally, run simple commands in Terminal. Every command here only reads information, so none of them changes your files.
You do not need to know anything about file systems beforehand.
From physical disk to volumes
A Mac's internal storage is built in layers. Each layer is a separate idea, and storage reports mix them up easily.
- The physical drive. This is the flash storage soldered to or installed in your Mac. It has one fixed capacity, such as 512 GB.
- The partition. A partition is a slice of the physical drive. On a modern Mac, the main slice holds an APFS container.
- The APFS container. APFS (Apple File System) is the file system used on current Macs. A container is a pool of storage that APFS manages.
- The volumes. A volume is a named file system that lives inside a container. Your Mac has several. Finder shows only some of them.
The key point is in step 4. Volumes inside one container are not given fixed sizes. They all draw from the same pool.
Shared free space
Older file systems used fixed partitions. If you gave one partition 200 GB and another 300 GB, a full 200 GB partition stayed full even when the other had space to spare. APFS avoids this problem.
Each APFS volume uses only the space its files need. Any space not used by any volume is free for all of them. A volume's "available space" is therefore the container's free space, not a private amount reserved for that volume.
Here is an example with a 500 GB container:
| Volume | Used by this volume |
|---|---|
| System | 15 GB |
| Data | 300 GB |
| Preboot, Recovery, VM | 10 GB |
| Free space (shared) | about 175 GB |
If you delete 20 GB from the Data volume, the shared free space grows to about 195 GB. The System volume's free space also reads 195 GB, because every volume reports the same pool.
The volumes on a modern Mac
Since macOS Catalina, a startup disk is split into several volumes, each with a job.
| Volume | What it holds | Can you affect it? |
|---|---|---|
| System (usually named Macintosh HD) | The macOS operating system, mounted read-only | No. It is protected and sealed. |
| Data (named Macintosh HD - Data) | Your files, apps you install, settings, caches, and everything else you create | Yes. This is where all your cleanup happens. |
| Preboot | Files used to start up the Mac | No |
| Recovery | macOS Recovery tools | No |
| VM | Swap files, which macOS uses when memory runs short | Not directly. macOS manages them. |
Splitting the system from your data protects macOS. Because the System volume is read-only, a mistake in your home folder cannot damage the operating system itself.
Firmlinks make two volumes look like one
If the System and Data volumes are separate, you might expect to see two disks in Finder. You see one, because macOS joins them with firmlinks. A firmlink is a link between a folder on the System volume and a folder on the Data volume. Folders such as /Users and /Applications look like they sit on the System volume, but their contents live on the Data volume. The result is one familiar folder tree.
This matters for Terminal. Your files physically live on the Data volume, so that is the volume to measure.
Looking at the layout yourself
You can see the layout with diskutil, a command-line tool that describes disks. This command lists every APFS container and volume on your Mac:
diskutil apfs listIn the output, find the container that holds your startup volumes. It prints the container's total capacity and the capacity not allocated to any volume (the free pool). Under it, it lists each volume with its name, role, and the space that volume consumes. Roles such as System, Data, Preboot, Recovery, and VM match the table above.
Measuring free space in Terminal
To see used and available space for the volume that holds your files, use df, which reports free disk space:
df -h /System/Volumes/DataThe -h flag prints sizes in readable units. The path /System/Volumes/Data is where macOS mounts the Data volume.
The output has columns for size, used space, and available space. The columns you care about most are Size and Avail. The Size value is the whole container, not only the Data volume. Used covers only the Data volume.
Common error: measuring the wrong path
Beginners often run df -h /. That reports on the System volume. Its Used column is small and does not reflect your files. The Avail column still reflects the shared pool, but the Used column and Capacity percentage can mislead you about how full your disk is. Use /System/Volumes/Data when you want to know how much of your disk your own data takes up.
Why different tools report different numbers
You may see slightly different totals in System Settings, Finder, and Terminal. Several things cause this.
Different units
Finder and System Settings count in powers of 1000, so 1 GB is 1,000,000,000 bytes. df -h counts in powers of 1024 and labels the result Gi, where 1 Gi is 1,073,741,824 bytes. The same disk looks about 7% smaller in Gi. To get powers of 1000 from df, use -H instead of -h:
df -H /System/Volumes/DataSizes of the container versus the volume
A 512 GB Mac does not show 512 GB of usable space for you. The container total includes the System volume and the helper volumes, so your usable room is less than the marketing capacity.
Clones
APFS can make a clone of a file. A clone is a copy that shares the original's data on disk until one of them is changed. When you duplicate a large file in Finder, it often finishes instantly and takes almost no extra space. Tools that add up the file sizes will count it twice, so the sum of file sizes can exceed the space actually used.
Sparse files and compression
Some files are sparse, meaning they claim a large logical size but store only the parts that hold data. Virtual machine disk images are a common example. APFS can also compress some files transparently. In both cases the size a file reports differs from the space it occupies.
Snapshots
A snapshot is a read-only record of a volume at one moment. Time Machine and macOS updates create them. A snapshot keeps the old versions of changed or deleted files, so deleting a large file may not raise your free space until the snapshot that references it goes away. A later chapter covers local snapshots and purgeable space in detail. For now, remember that "I deleted it" and "the space came back" can differ.
A worked example
Suppose your Mac reports 40 GB free. You delete a 25 GB folder and empty the Trash. You expect 65 GB free, but you see 42 GB.
Work through the layers:
- Confirm what you are measuring. Run
df -h /System/Volumes/Datarather thandf -h /. - Check whether the files were clones. If the 25 GB folder was a clone of another folder, deleting it freed almost nothing, because the data is still used by the original.
- Check whether a snapshot still holds the old data. Time Machine local snapshots can keep deleted files until they expire.
- Wait and measure again. macOS may free some space in the background.
In this chain, the Trash emptying is the simplest step, and the shared pool, clones, and snapshots explain most of the surprises. You now have the model to ask the right question: which layer holds the space?
What to remember
- A Mac's storage is one physical drive holding one APFS container, which holds several volumes.
- Volumes share free space. They do not have fixed sizes.
- Your own files live on the Data volume. The System volume is read-only and protects macOS.
- Measure
/System/Volumes/Datawithdf, not/. - Reported numbers differ because of units, clones, sparse files, compression, and snapshots.
Exercise
You run df -h / and see that only 12 GiB is used on a Mac that holds 300 GB of personal files. Why is the number so low, and which command should you run to see how full the disk is with your data?
Show answer
The path / is the read-only System volume, which holds macOS but not your files. Your files live on the Data volume. Run df -h /System/Volumes/Data to see how much of the shared pool your data uses and how much space is available.
Exercise
You duplicate a 10 GB video in Finder on an APFS disk. The copy finishes in a second, and your free space barely changes. What APFS feature explains this, and what happens when you later edit the copy?
Show answer
APFS made a clone. The copy shares the original's data on disk, so it needs almost no new space. When you edit the copy, APFS stores only the changed parts separately, so the copy's real space use grows with the amount you change.