MainspringGuides › Temporary Files
macOS Guide

Where Are Temporary Files on Mac (Safe to Delete?)

Updated July 2026 · 3 min read

macOS doesn't keep temporary files in one tidy folder. They're spread across a per-user temp directory with a randomized path, system staging areas under /private, and per-app caches in your Library. Most of it is managed automatically — and the fastest, safest "cleanup" is a restart, not a delete key.

Where macOS keeps temporary files

To see where your own temp directory lives, and how big the system's temp tree has grown:

# Print your user temp directory (read-only)
echo $TMPDIR
# Total size of the system temp/cache tree (read-only)
sudo du -sh /private/var/folders

How big do they get — and is that a problem?

On a healthy Mac, /private/var/folders commonly holds a few hundred megabytes to a few gigabytes. It grows with uptime: the longer since your last restart, the more staged downloads, render caches, and half-finished scratch files accumulate. Big numbers here are usually a symptom of never restarting, not of a broken system. macOS 13 Ventura, 14 Sonoma, and 15 Sequoia all behave the same way: temp files are cleaned at boot and periodically in the background.

One caveat on the numbers you see: storage tools often lump this tree into the vague "System Data" category, which makes it look scarier than it is. A 3 GB temp tree on a Mac that's been up for a month is normal working overhead, not waste. If the folder is tens of gigabytes, one app is usually misbehaving — sort ~/Library/Caches by size to find the culprit before blaming the system.

What's actually safe to clear

  1. Restart first. A reboot clears $TMPDIR contents, prunes /private/var/folders, and releases swap — everything the system knows is disposable, removed the safe way. Do this before any manual deleting.
  2. Then, if needed, clear individual app caches. Quit the app, open ~/Library/Caches (in Finder: Go → Go to Folder), and delete the folder belonging to that app only.
  3. Stop there. Don't dig into /private/var/folders by hand.
# Example: clear one app's cache while that app is closed
rm -rf ~/Library/Caches/com.spotify.client
# There's no undo for a deletion — but no undo is needed:
# the app rebuilds this cache automatically on next launch

The hard rule: never bulk-delete the contents of /private/var (or /private/var/folders) while your Mac is running. Live apps and login sessions hold files there; ripping them out can crash apps, break Spotlight and Quick Look, or leave you unable to log in until things are rebuilt. Anything genuinely stale in there is exactly what a restart removes for free.

Tune what's worth tuning

Temp files clean themselves — your Mac's hidden settings don't. While you're in maintenance mode, Mainspring turns 90+ of them into labelled, reversible toggles you can flip in one click.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Chasing a bigger cleanup?

If you landed here trying to reclaim serious disk space, temp files are rarely the jackpot — caches elsewhere usually are. See our guide to clearing caches on Mac safely for the locations that actually hold gigabytes.