Start with what macOS already gives you: empty the Trash, then open System Settings > General > Storage (macOS 13 Ventura or later; on older versions, Apple menu > About This Mac > Storage) and work through the recommendations and the largest categories. If you write code, the next biggest wins are rebuildable developer folders such as Xcode DerivedData, Docker images and old node_modules. Leave system files, ~/Library as a whole and the inside of your Photos library alone.
Where does the space on a Mac actually go?
On most Macs, space goes to the same places, roughly in this order of size:
- Your own media and documents. Photos and videos, music, projects, and anything in Desktop, Documents and Downloads. These are the biggest by far on most personal Macs, and they are yours: nothing should remove them without you deciding.
- Apps. Big creative and developer apps (Xcode alone is many gigabytes) plus apps you no longer use.
- Downloads. Installers (
.dmg,.pkg,.zip), videos and archives you opened once. - iOS backups and firmware. Apple lists these under iOS files in Storage settings.
- Mail and Messages attachments.
- System Data. Apple describes it as files that don't fit the other categories: logs, caches, temporary files and other things the system manages.
- Developer folders. If you build software, this is often where the surprise is: Xcode build products and simulator runtimes, Docker's disk image,
node_modulesin every project, and package manager caches. Each one is rebuildable, and each can quietly grow into tens of gigabytes.
To see your own numbers from Terminal, this lists the largest folders in your home folder. It can take a minute or two, and some folders print errors unless Terminal has Full Disk Access, which the 2>/dev/null hides:
# the 15 largest folders in your home folder $ du -sh ~/* ~/.[!.]* 2>/dev/null | sort -hr | head -15

Step 1: Use the built-in macOS storage tools first
Apple's tools are free, already installed and know about iCloud, so start there.
Open System Settings > General > Storage. At the top you'll see recommendations. Apple describes them like this:
- Store in iCloud: keeps Desktop and Documents in iCloud Drive, photos in iCloud Photos and messages in iCloud, keeping only recently opened files on your Mac when space is needed. This needs enough iCloud storage, which may mean a paid plan.
- Optimize Storage: removes Apple TV movies and shows you've already watched and keeps only recent email attachments on the Mac when space is needed.
- Empty Trash Automatically: erases items that have been in the Trash for more than 30 days.
Below the recommendations is a list of categories. Click the info button next to one to see and remove what's inside:
- Applications: sort by size or last used date and delete apps you no longer open.
- iOS files: old iPhone and iPad backups and firmware files. Delete backups of devices you no longer own.
- Documents: large files you might have forgotten.
- Trash: empty it. Apple is explicit that storage space doesn't become available until you do.
macOS also clears caches and logs that are safe to delete on its own when space is needed, so you rarely need to fight it for those.
Everything in this step is reversible until you empty the Trash, except removing apps you'd have to download again.
Step 2: Find large and old files in Downloads, Desktop and Documents
Downloads is the classic one: installers you ran once, screen recordings, zipped exports. In Finder, open Downloads, switch to list view and sort by Size. Or ask Terminal for every file over 1 GB:
# files over 1 GB in the usual places, largest first $ find ~/Downloads ~/Desktop ~/Documents -type f -size +1G -exec du -h {} + 2>/dev/null | sort -hr
These are your files. Nothing in them comes back if you delete it, so open anything you're unsure about before removing it.
Step 3: Clear developer folders that rebuild themselves
If you have Xcode, Docker or Node.js installed, this step usually frees more than everything else combined. Every item below is rebuilt by its tool when needed; the cost is a slower first build or a fresh download.
| What | Where | Typical size | Comes back? |
|---|---|---|---|
| Xcode DerivedData | ~/Library/Developer/Xcode/DerivedData | 1–30 GB | Yes, on the next build |
| Simulator runtimes | managed by xcrun simctl runtime | several GB each | Only if you download them again |
| iOS DeviceSupport | ~/Library/Developer/Xcode/iOS DeviceSupport | 2–5 GB per iOS version | Yes, when you connect that device |
| Docker images and build cache | inside Docker Desktop's disk image | 5–60 GB | Yes, when you pull or build again |
node_modules | inside each project | 100 MB–1 GB per project | Yes, with npm install |
| npm cache | ~/.npm | 1–5 GB | Yes, as you install packages |
| Homebrew downloads | ~/Library/Caches/Homebrew | 0.1–5 GB | Yes, when needed |
Sizes are rough ranges, and yours can be smaller or much larger; measure before you delete. Each has its own guide with exact commands:
- Xcode: How to clear Xcode DerivedData and old simulators
- Docker: Reclaim disk space from Docker on a Mac
- Node.js: Delete node_modules safely
- Everything else (Gradle, Cargo, Go, pip, Android, JetBrains and more): Every developer cache you can safely delete on macOS
A quick example: DerivedData is the single safest large folder on a Mac with Xcode. Quit Xcode, then:
# how big is it? $ du -sh ~/Library/Developer/Xcode/DerivedData # move it to the Trash (quit Xcode first) $ mv ~/Library/Developer/Xcode/DerivedData ~/.Trash/
Moving to ~/.Trash/ with mv keeps the folder recoverable until you empty the Trash, though Finder's Put Back won't know where it came from. If the Trash already holds a folder with the same name, mv stops with an error instead of overwriting anything. On macOS 15 and later there is also a built-in trash command that does the same job.
Step 4: App caches, one app at a time
~/Library/Caches holds a folder per app, named after the app or its bundle ID (for example com.spotify.client). Caches are meant to be rebuildable, so clearing one app's folder is usually fine:
# biggest app caches $ du -sh ~/Library/Caches/* 2>/dev/null | sort -hr | head -15 # move one app's cache to the Trash (quit that app first) $ mv ~/Library/Caches/com.example.app ~/.Trash/
Quit the app first; a running app may rewrite its cache straight away or misbehave. Skip folders that start with com.apple., which belong to macOS and its apps. Expect the app to feel slower once while it rebuilds.
This is one place where I built Shedi to be stricter than the usual advice: it skips apps that are running and Apple's own folders automatically, and it shows each app's cache as its own item so you never clear the whole folder blind.
What should you never delete to free up space?
Some folders look big and tempting. Leave these alone:
- System files. Anything in
/System, and the top-level/Libraryunless a specific guide from the software's maker tells you to. macOS protects much of this anyway. ~/Libraryas a whole. Your home Library folder holds caches, but also app settings, mail, Messages history, keychains, app data inContainersandGroup Containers, andApplication Support. Delete the folder and you lose all of it. Clear named cache folders instead.- The inside of your Photos library.
Photos Library.photoslibraryis a package; deleting files inside it can corrupt the library. Remove photos from within the Photos app, then empty Recently Deleted. - iCloud Drive placeholders. Files that show a cloud icon aren't taking local space. Deleting them deletes them from iCloud everywhere.
- Docker's disk image file (
Docker.raw). Deleting it in Finder destroys every image, container and volume at once. Clean inside Docker instead. - Anything you can't name. If you don't know what a folder is, look it up first. "It was big" is not a reason.
Why is System Data so large?
Apple describes System Data as files that don't fall into the other categories, including logs, caches, temporary files, fonts, app support files and plug-ins, and Storage settings don't let you manage it directly. You can't clean it with one button. In practice it shrinks when you clear the specific caches you understand (step 3 and step 4), and macOS clears some caches and logs by itself when space runs low.
Last step: empty the Trash
Every method above moves things to the Trash so you can change your mind. Once you've used your Mac for a day or two and nothing is missing, empty the Trash. That's the moment the space actually comes back.
On my own Mac, the developer folders alone came to 21.5 GB on the first scan. Yours might be less or much more; the point is to know what each folder is before it goes. If you'd rather not run the commands yourself, Shedi does the same steps with an explanation on every item and a one-time price (see pricing).
