Free up space on Mac without losing anything

Where Mac storage really goes, which built-in macOS tools to use first, which developer folders are safe to clear, and what you should never delete.

Short answer

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:

  1. 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.
  2. Apps. Big creative and developer apps (Xcode alone is many gigabytes) plus apps you no longer use.
  3. Downloads. Installers (.dmg, .pkg, .zip), videos and archives you opened once.
  4. iOS backups and firmware. Apple lists these under iOS files in Storage settings.
  5. Mail and Messages attachments.
  6. System Data. Apple describes it as files that don't fit the other categories: logs, caches, temporary files and other things the system manages.
  7. Developer folders. If you build software, this is often where the surprise is: Xcode build products and simulator runtimes, Docker's disk image, node_modules in 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:

Terminal
# the 15 largest folders in your home folder
$ du -sh ~/* ~/.[!.]* 2>/dev/null | sort -hr | head -15
Shedi finds this for you in about 10 secondsDeveloper junk, app caches and large old files, every item explained. Only Safe items are pre-selected, and everything goes to the Trash first.
Get Shedi

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.

Safe

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:

Terminal
# 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
Check first

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.

WhatWhereTypical sizeComes back?
Xcode DerivedData~/Library/Developer/Xcode/DerivedData1–30 GBYes, on the next build
Simulator runtimesmanaged by xcrun simctl runtimeseveral GB eachOnly if you download them again
iOS DeviceSupport~/Library/Developer/Xcode/iOS DeviceSupport2–5 GB per iOS versionYes, when you connect that device
Docker images and build cacheinside Docker Desktop's disk image5–60 GBYes, when you pull or build again
node_modulesinside each project100 MB–1 GB per projectYes, with npm install
npm cache~/.npm1–5 GBYes, as you install packages
Homebrew downloads~/Library/Caches/Homebrew0.1–5 GBYes, 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:

A quick example: DerivedData is the single safest large folder on a Mac with Xcode. Quit Xcode, then:

Terminal
# 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:

Terminal
# 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/
Check first

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 /Library unless a specific guide from the software's maker tells you to. macOS protects much of this anyway.
  • ~/Library as a whole. Your home Library folder holds caches, but also app settings, mail, Messages history, keychains, app data in Containers and Group Containers, and Application Support. Delete the folder and you lose all of it. Clear named cache folders instead.
  • The inside of your Photos library. Photos Library.photoslibrary is 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).

Sources

Questions

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

Empty the Trash, then open System Settings > General > Storage and work through the recommendations and the largest categories. On a developer's Mac, clearing Xcode DerivedData, unused Docker images and old node_modules folders usually frees the most space with no lasting effect, because all three are rebuilt when needed.

Is it safe to delete everything in ~/Library/Caches?

Caches are meant to be rebuildable, so deleting a single app's cache folder is generally safe if the app is closed. Deleting the whole folder at once is not a good idea: apps lose state they would rather keep, some folders belong to the system, and macOS already clears caches by itself when space runs low.

Why didn't my free space go up after deleting files?

Deleted files sit in the Trash, and Apple notes that the space doesn't become available until you empty it. Docker is the other common case: its disk image file only gives space back after images are deleted inside Docker, not when you delete files from Finder.

Can I delete System Data on a Mac?

Not directly. Apple describes System Data as files that don't fit the other categories, such as logs, caches and temporary files, and Storage settings don't let you manage it. You can shrink it indirectly by clearing app and developer caches you understand.

Should I delete the Library folder to free up space?

No. ~/Library holds your app settings, mail, message history, keychains and app data alongside caches. Clear specific, named cache folders instead, one app at a time.