What is safe to delete on a Mac, and what absolutely is not

15 September 2026 · FrameLogic Limited

Most advice about freeing space on a Mac is either uselessly vague or actively dangerous. This is the practical version: what genuinely regenerates, what does not, and the folders that look disposable but are not.

The short answer: package manager caches and browser caches are safe and rebuild themselves. Build caches are safe when nothing is building. Anything inside a media library package is not safe, even though it is literally called a cache.

Safe, and rebuilds itself

Package manager caches

These exist purely to save a download. Deleting them costs you a re-download next time and nothing else.

~/.npm/_cacache
~/.bun/install/cache
~/.cache/uv
~/Library/Caches/CocoaPods
~/Library/Caches/Homebrew

One caveat that catches people: do not clear these while an install is running. Pulling the npm cache out from under a running npm install will fail that install.

Build caches

~/Library/Developer/Xcode/DerivedData
~/.gradle/caches
~/.dartServer

All rebuild on the next build. DerivedData in particular gets very large and is frequently several gigabytes on a working machine. The rule is the same as above and matters more here: never while a build is running. See why that one is worth caring about.

Browser caches

Browsers refill these automatically and you stay signed in, because sessions are not stored there. Safari, Chrome and Firefox all handle this gracefully.

Old logs and updater leftovers

Installers that have already been applied are pure junk. Diagnostic logs older than a month are rarely useful to anyone.

Not safe, despite appearances

Anything inside a media library

This is the big one. A Photos library, a Final Cut library and a Lightroom catalogue are directories that macOS presents as a single file. Inside them are folders genuinely named Cache and Thumbnails, and they look exactly like the disposable ones above.

They are not. They are part of the library's internal structure. Deleting them can trigger a rebuild lasting hours, and in the worst case leaves the catalogue inconsistent. Any tool that clears "all caches" without understanding package boundaries can do real damage here.

System folders

/System and /Library at the root of the drive belong to macOS. Modern macOS protects most of this, but not all of it, and there is nothing in there worth reclaiming.

Anything you cannot identify

If you do not know what put it there and cannot tell what it does, the few gigabytes are not worth the risk. This sounds overly cautious until the one time it is not.

The Trash question

Emptying the Trash is safe by definition, since you already decided those files should go. It is worth mentioning only because some tools empty it automatically as part of a cleanup, which is a meaningful difference: that is your data, not a cache, and it should never happen without you choosing it.

A sensible order

  1. Check what is actually taking the space before deleting anything. Apple menu, About This Mac, More Info, Storage.
  2. Clear package manager and browser caches. Low risk, often several gigabytes.
  3. Clear build caches, having checked nothing is building.
  4. Look at Downloads, which is usually the largest genuinely deletable folder nobody thinks about.
  5. Only then consider anything else, and only if you can name what it is.

Doing it without the risk. GuardMac shows you the total and the itemised list before it deletes anything, refuses to touch caches inside a Photos, Final Cut or Lightroom library, stands down entirely while a build or an export is running, and never empties your Trash unless you explicitly ask. Documents, Downloads, Desktop, Pictures and Movies are never touched at all. The free version lets you review and reclaim by hand, at no cost and with no account. Download it here.

The underlying rule

A cache is only safe to delete if whatever created it will notice it is gone and rebuild it. Package managers will. Browsers will. Media libraries assume their internal files are still there, which is precisely why they are the dangerous case.

Keep reading