The dialog says your disk is almost full. It does not say what filled it. You check Photos and find 10GB, Applications and find 20GB, Documents and find 8GB. That is 38GB on a 256GB drive, which leaves a lot of space unaccounted for.
Here is the order to look in, based on what actually pays off. Start at the top and stop when you have enough space.
Step 1: get a real number in five seconds
df -h /
du -sh ~/* 2>/dev/null | sort -hr | head -12
The first command tells you how much space is actually free. The second ranks the top level folders in your home directory by size. This one line usually answers the question before you have opened any app, and it works on a 20GB problem and a 200GB problem equally well.
Step 2: check the hidden folder
du -sh ~/Library/* 2>/dev/null | sort -hr | head -12
macOS hides your Library folder, and it is where most missing space lives. Caches, app support data, device backups and developer output all sit in here. If one line is above 10GB, that is your answer and the rest of this guide is just detail.
Common results on a machine that has never been cleaned:
~/Library/Caches, 10GB to 40GB of rebuildable app data.~/Library/Application Support/MobileSync, local iPhone backups at 30GB to 80GB each.~/Library/Containers/com.docker.docker, a Docker disk image that grows and does not shrink.~/Library/Developer/Xcode/DerivedData, build output from every project you have compiled.
Step 3: look for single large files
find ~ -type f -size +2G 2>/dev/null | head -20
Disc images, screen recordings, old exports and downloads you forgot about. One forgotten 12GB file is a better return on effort than an hour of cache clearing, and this command takes about a minute.
Step 4: empty the Trash and check the obvious
du -sh ~/.Trash
Boring, and frequently worth several gigabytes. Also check for installers in Downloads. A macOS installer is 12GB to 15GB, and Xcode's installer is larger still.
Step 5: understand what macOS will not show you
Anything macOS cannot classify lands in System Data, which is why that grey bar can show 180GB with no explanation. It includes local snapshots, swap, logs and hidden caches. The dedicated System Data guide covers each contributor, but the short version is that step 2 usually explains it.
Step 6: handle the developer tax, if it applies to you
If you build software, the usual culprits are Xcode output, Docker images, dependency folders and simulator runtimes. On an active machine these reach 100GB and above, and they grow every week. Guides for each one are linked below, and this is the category where a tool earns its price, because the folders are hidden, deep and easy to forget.
macoptimize scans all of these locations in one pass and returns a single screen: 138.91 GB reclaimable across 19 items on the machine in our screenshots, grouped into Developer, Browser and System. You tick what you want removed, confirm, and the History tab records the result. The Analyze tab also renders your home folder as a treemap for the cases where the answer is a folder nobody thought to check.
What not to do
- Do not clear
~/Library/Application Supportin bulk. It holds mail data, save games and device backups. - Do not delete swap files in
/private/var/vm. macOS manages them, and deleting them can destabilise a running system. - Do not run a recursive delete on a path you have not printed first.
- Do not erase and reinstall as a cleanup strategy. It takes hours and the space comes back.
The habit that prevents this
Check free space once a month and note the number. A Mac that loses 8GB a month is drifting, and drifting is easy to fix early and painful to fix at 2GB free. If the drop is sudden rather than gradual, something specific happened: an update, a new Docker image, a device backup or a large download.
The twenty minute version
If you only do one pass, do this one, in this order. It is sorted by yield per minute rather than by what is easiest to find:
df -h /for a real number, andtmutil listlocalsnapshots /to see whether snapshots are holding deleted data.- Empty the Trash, then check the Downloads folder for installers you have already used.
- Sort your home folder by size in Terminal with
du -sh ~/* 2>/dev/null | sort -hr | head -12. - Go one level into whatever is at the top and repeat. Two levels is usually enough to find the culprit.
- Clear the developer caches if the folder list contains Developer, Projects or Containers.
- Check the largest files on the machine with
find ~ -type f -size +2G 2>/dev/null | head -20. - Thin snapshots, reboot, wait five minutes, and measure again.
What a typical audit finds
| Finding | Frequency | Typical size |
|---|---|---|
| Developer caches and build output | On machines used for coding | 30GB to 150GB |
| Local Time Machine snapshots | Very common | 10GB to 60GB |
| Video and screen recordings | Common | 5GB to 80GB |
| Old iPhone and iPad backups | Common | 5GB to 60GB |
| Downloaded installers | Almost universal | 2GB to 20GB |
| Duplicate media | Frequent, usually smaller than assumed | 0.5GB to 10GB |
Notice that duplicates are at the bottom. Most people start there, and most people are disappointed by the result.
When nothing shows up
Occasionally the home folder is modest and the disk is still full. Three explanations cover it:
- Snapshots. Deleted data stays referenced and the space is not returned until they are thinned.
- Hidden folders.
~/.npm,~/.gradle,~/.docker,~/.cacheand~/Library/Developerdo not appear in a normal Finder list, and together they can be tens of gigabytes. - A virtual machine image. A single
.rawor.vmdkfile for a Linux VM is commonly 40GB or more, and it looks like one unremarkable file.
The find command for files over 2GB above is the fastest way to catch the third case.
Keeping it flat afterwards
- Check free space monthly. A trend line tells you more than a single reading.
- Delete screen recordings the week you make them, not the year after.
- Clear build output monthly on a development machine, since that is the folder that refills fastest.
- Keep 15 percent of the drive free, so macOS has room for swap, snapshots and updates.
None of those take more than a few minutes. Together they turn a recurring emergency into a background habit, which is the actual difference between machines that stay healthy and machines that fill up.
FAQ
Which folders free the most space fastest?
Xcode DerivedData, the Docker disk image, local Time Machine snapshots and iOS device backups, in roughly that order. Each is a single location, each can hold tens of gigabytes, and each is safe to clear once you have checked what it holds.
Do I need a paid cleaner to do this?
No. Everything in this guide uses tools already on the Mac or a one line Terminal command. A cleaner earns its price by showing you sizes and paths without hunting, and by keeping a record of what it removed, not by having access to secret folders.
How much free space should I keep?
Aim for 15 percent of the drive. On a 512GB Mac that is about 75GB, and on a 1TB Mac about 150GB. Below 10 percent macOS starts making compromises with snapshots and swap, and updates may refuse to install.
Why did the space not come back after deleting files?
Local snapshots are holding the deleted blocks. Run tmutil listlocalsnapshots / to confirm, thin them, and give it a few minutes. A reboot speeds the process up and is often what finally shows the space as free.
Is it worth using a treemap instead of the Terminal?
For finding a large unknown, yes. A treemap answers what is big and where it lives in one glance, while du answers the same question as a sorted list. Using both is normal: the visual for orientation, the command for confirmation.