WTMemory guide

How to free up disk space on Mac: a developer playbook

Updated 13 October 2026

To free up disk space on a Mac, first measure what is big with df -h and du, then clear regenerable data: developer caches, old downloads, local AI models, iOS backups you no longer need, and Time Machine local snapshots. Finish by emptying the Trash, because files moved there still use space until you do.

This playbook is written for developers, whose disks fill up with build output and package caches rather than photos. Every step uses built-in tools. If you prefer a visual overview, WTMemory shows supported cache and model locations for free from the menu bar.

How do I check how much disk space is left?

Open System Settings > General > Storage for Apple's summary. It is slow to calculate and lumps a lot into "System Data", so the Terminal is more useful:

df -h /System/Volumes/Data   # size, used and available on your data volume
diskutil info / | grep -i "free\|available"

On APFS all volumes share one container, so the "Avail" figure is what matters. Keep at least 10 to 15 percent free: macOS needs room for swap, updates and snapshots, and a nearly full disk slows everything down.

What is taking up space in my home folder?

Start broad and drill into whatever is largest:

du -sh ~/* ~/.[!.]* 2>/dev/null | sort -h | tail -20
du -sh ~/Library/* 2>/dev/null | sort -h | tail -15
du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -15

sort -h orders human-readable sizes, and tail keeps the biggest at the bottom. Some folders report "Operation not permitted" unless Terminal has Full Disk Access (System Settings > Privacy & Security); the 2>/dev/null hides those errors, so totals can be slightly low.

Which developer caches can I delete safely?

These caches are rebuilt or re-downloaded on demand. Clearing them costs time on the next build or install, not data. Quit the related tools first.

ToolLocation or commandGuide
Xcode build output~/Library/Developer/Xcode/DerivedDataXcode DerivedData
Old iOS device symbols~/Library/Developer/Xcode/iOS DeviceSupportXcode guide
Simulatorsxcrun simctl delete unavailableXcode guide
npmnpm cache clean --force (cache in ~/.npm)npm, Yarn, pnpm
pnpmpnpm store prunenpm, Yarn, pnpm
Yarnyarn cache cleannpm, Yarn, pnpm
Bun~/.bun/install/cachepackage caches
Cargo~/.cargo/registry, plus target folders in projects
Gradle~/.gradle/caches
Homebrewbrew cleanup --prune=all
Dockerdocker system df, then docker system pruneDocker disk space

Also check your projects for node_modules, target, .next, dist and build folders in repos you are not working on:

find ~/Projects -name node_modules -type d -prune -exec du -sh {} + 2>/dev/null | sort -h | tail

Do not delete Docker's Docker.raw file by hand. It holds every image, container and volume, including database data. Use Docker's own commands, covered in the Docker guide.

How much space do local AI models use?

Often more than anything else on a developer Mac. One 70B model is around 40 GB at 4-bit. Check the usual locations:

du -sh ~/.ollama/models ~/.cache/huggingface/hub ~/.lmstudio/models 2>/dev/null

Remove Ollama models with ollama rm <name>, not by deleting blobs. Never delete ~/.cache/huggingface as a whole, since it can hold your access token. The AI models guide covers each tool, including moving models to an external drive.

What about Downloads, iOS backups and big files?

Downloads

Installers, disk images and zip files pile up here. Sort by size in Finder (View > Show View Options) or run du -sh ~/Downloads/* | sort -h | tail -20. Old .dmg and .zip files are usually safe to remove once the app is installed.

iPhone and iPad backups

Local device backups live in ~/Library/Application Support/MobileSync/Backup and can be tens of gigabytes each. Do not delete the folders directly: you cannot tell which device or date they belong to, and you may remove the only copy of your phone's data. Instead, open Finder, select your device in the sidebar, click Manage Backups, and delete old backups there. Make sure you have a recent backup (local or iCloud) first.

Large files anywhere

find ~ -type f -size +1G 2>/dev/null

This lists every file over 1 GB in your home folder: VM images, video exports, old archives and datasets usually show up.

How do I remove Time Machine local snapshots?

When Time Machine is on, macOS keeps hourly local snapshots on your internal disk. They are normally purged automatically when space runs low, but they can make a large deletion look like it freed nothing. List them:

tmutil listlocalsnapshots /

Ask macOS to thin them, here aiming to reclaim about 20 GB at the highest urgency (4):

tmutil thinlocalsnapshots / 20000000000 4

You can also delete snapshots for a specific date with sudo tmutil deletelocalsnapshots 2026-10-12-093015, using a date from the list. Deleting snapshots removes those restore points, but backups already copied to your Time Machine drive are not affected.

Why didn't deleting files free up space?

What should I never delete to free up space?

Can an app do this without the risk?

WTMemory is a native menu-bar app for macOS 12 and later. Inspection is free: the Storage view scans supported locations (Xcode DerivedData, iOS DeviceSupport and Simulator caches, npm, pnpm, Yarn, Bun, Cargo and Gradle caches, plus Ollama, Hugging Face Hub, LM Studio, ComfyUI and selected Claude Code caches), and Disk Explorer shows a folder breakdown and up to 50 of its largest files. Pro ($9 once for up to three Macs, with a 7-day trial) lets you select items, read the consequences, and move them to the Trash after review. Nothing is selected or deleted automatically, Docker VM data and source code are excluded, and emptying the Trash stays your decision.

Download WTMemory

Frequently asked questions

What is the fastest way to free up disk space on a Mac?

Empty the Trash, then clear regenerable developer caches such as Xcode DerivedData and package manager caches, and remove local AI models you no longer use. These are usually the largest safe wins on a developer Mac.

Is it safe to delete ~/Library/Caches?

Individual folders inside ~/Library/Caches are generally safe to delete because apps recreate them, but quit the app first. Do not delete ~/Library itself, which holds settings and app data.

How do I find large files on a Mac from Terminal?

Run du -sh ~/* 2>/dev/null | sort -h to see folder sizes, or find ~ -type f -size +1G to list every file over 1 GB in your home folder.

Why does my Mac still show no free space after deleting files?

The files may still be in the Trash, referenced by a Time Machine local snapshot, or held open by a running app. Empty the Trash, thin snapshots with tmutil, and quit the app.

Can I delete old iPhone backups on my Mac?

Yes, but use Finder's Manage Backups window rather than deleting folders in ~/Library/Application Support/MobileSync/Backup, and keep at least one recent backup.

Related guides