
Quick answer
Go to System Settings → [Your Name] → iCloud → iCloud Drive and toggle on "Optimize Mac Storage." macOS will automatically move files you haven't opened recently to iCloud, freeing local disk space on demand.
How to Optimize Mac Storage
The built-in feature is a good start. But it only handles iCloud files — and it has one serious failure mode. Here's the full picture.
What Does "Optimize Mac Storage" Actually Do?
It's a macOS feature that offloads files to iCloud when your disk gets tight. Recently used files stay local; older ones move to the cloud and download automatically when you open them.
macOS prioritizes offloading:
- Apple TV / iTunes purchases — movies and shows you bought but haven't watched recently
- Email attachments — older Mail messages get their attachments removed locally
- iCloud Drive files — documents and folders you haven't touched in a while
Files don't disappear. They show a cloud icon in Finder. Click one and it downloads in a few seconds.
How to Enable It (Step by Step)
macOS Ventura and later
- 1Open System Settings
- 2Click your name at the top of the sidebar
- 3Select iCloud → iCloud Drive
- 4Toggle on "Optimize Mac Storage"
macOS Monterey and earlier
- 1Apple menu → System Preferences → Apple ID
- 2Select iCloud in the sidebar
- 3Check "Optimize Mac Storage"

When Optimize Storage Works Against You
You're on a plane, at a conference with bad WiFi, or in a spot with spotty connection. You try to open a file you haven't touched in two weeks — and it's not there. macOS offloaded it. You get a spinning wheel and an error about needing internet.
Fix: In Finder, right-click any folder and select "Keep Downloaded." This pins it locally and overrides the offloading logic. Use it for active project folders and anything you can't lose access to offline.

5 More Ways to Optimize Mac Storage Manually
The built-in feature only handles iCloud files. These five methods cover everything else.
1. Delete Old iPhone and iPad Backups
iTunes/Finder backups are 3–10 GB each. If you've owned multiple iPhones, you likely have backups from 2022 still sitting there.
Finder → your iPhone in sidebar → Manage Backups
Also available at System Settings → General → Storage → iOS Files
2. Clean Up System Data and Caches
"System Data" can hit 20–40 GB on a machine running for a few years. Safe to clear manually:
- →Application logs:
~/Library/Logs — anything older than a few weeks - →Chrome cache:
~/Library/Caches/Google/Chrome - →Xcode derived data:
~/Library/Developer/Xcode/DerivedData — Xcode rebuilds automatically
Don't delete blindly in ~/Library/Application Support — some apps store real user data there.
3. Compress Videos Instead of Deleting Them
A 1-minute 4K clip from your iPhone is around 400 MB. Compress it and it's 40–60 MB with no visible quality loss at normal viewing sizes.
Deleting old downloads saves gigabytes. Compressing your video library saves tens or hundreds of gigabytes — without losing a single file.
Try MediaOptim — compress videos locally, no subscription4. Find and Remove Large Files
System Settings → General → Storage → Storage Settings → Review Files. Sort by size descending. Look for forgotten disk images, archived project folders, old installers.
Finder shortcut: Press ⌘ + F in any folder → add "File Size" filter → "is greater than 100 MB"
5. Developer-Specific Culprits
On a 256 GB MacBook doing active development, these often consume 50–100 GB — and the usual storage guides never mention them.
| Tool | Typical size | How to clean |
|---|---|---|
| Xcode DerivedData | 10–30 GB | Delete ~/Library/Developer/Xcode/DerivedData |
| Xcode device support | 2–5 GB per iOS version | Delete old iOS version folders |
| Docker images | 10–50 GB | docker system prune -a |
| Homebrew cache | 2–10 GB | brew cleanup |
| node_modules | 0.5–2 GB per project | Delete in archived projects |