Laptop connected to external hard drive for Mac storage optimization

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 purchasesmovies and shows you bought but haven't watched recently
  • Email attachmentsolder Mail messages get their attachments removed locally
  • iCloud Drive filesdocuments 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

  1. 1Open System Settings
  2. 2Click your name at the top of the sidebar
  3. 3Select iCloud → iCloud Drive
  4. 4Toggle on "Optimize Mac Storage"

macOS Monterey and earlier

  1. 1Apple menu → System Preferences → Apple ID
  2. 2Select iCloud in the sidebar
  3. 3Check "Optimize Mac Storage"
Check first: make sure you have available iCloud storage. If your free 5 GB tier is already full, this feature won't offload anything. Verify at System Settings → [Your Name] → iCloud.
Person working on laptop at airport with no internet connection

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.

Hard drives and storage components for Mac storage management

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 subscription

4. 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.

ToolTypical sizeHow to clean
Xcode DerivedData10–30 GBDelete ~/Library/Developer/Xcode/DerivedData
Xcode device support2–5 GB per iOS versionDelete old iOS version folders
Docker images10–50 GBdocker system prune -a
Homebrew cache2–10 GBbrew cleanup
node_modules0.5–2 GB per projectDelete in archived projects

Frequently Asked Questions

What does "Optimize Mac Storage" actually do?
It offloads files you haven't opened recently to iCloud, keeping a lightweight placeholder on your disk. When you open an offloaded file, macOS downloads it automatically. It prioritizes Apple TV purchases, older email attachments, and iCloud Drive files.
Is it safe to turn on Optimize Mac Storage?
Generally yes, with one caveat: offloaded files become inaccessible when you're offline. For most users this is fine. If you travel frequently or work without reliable internet, right-click critical folders in Finder and select "Keep Downloaded."
Does Optimize Storage delete my files?
No. Files are still in iCloud — they're just not downloaded locally. You can access them any time you have internet. Nothing is deleted.
What's the difference between Optimize Storage and Store in iCloud?
"Store in iCloud" syncs your Desktop and Documents folders to iCloud. "Optimize Mac Storage" offloads less-used files when disk space runs low. Both can be active at the same time.
How do I check what's taking up space on my Mac?
Apple Menu → About This Mac → More Info → Storage Settings. You'll see a breakdown by category and a Recommendations section showing estimated savings per option.
Why is System Data so large?
System Data includes caches, logs, Xcode derived data, and app support files. It grows over time on any active machine. The biggest culprits are usually browser caches and developer tool artifacts.
Can I free up space without using iCloud?
Yes. Compress videos with a local tool like MediaOptim, delete old iPhone backups, run brew cleanup and docker system prune, and remove Xcode DerivedData. These often recover more space than iCloud offloading.

Related Solutions