How to Delete Temporary Files on a Mac (and Which Ones to Leave Alone)

If you've come from Windows, you might be looking for the Mac equivalent of %temp%, the folder you could empty to claw back a few gigabytes. macOS has temporary folders too, but they work differently: they're hidden, they're cleaned automatically, and deleting them by hand while your Mac is running is more likely to cause problems than free space. The temporary files that do pile up on a Mac are mostly created by individual apps, and that's where the real cleanup is.
Quick answer: macOS stores system and app temporary files in hidden folders (/private/tmp and a per-user folder under /private/var/folders) and cleans them automatically, deleting old items daily and at startup. The safest way to clear them is simply to restart your Mac. Don't delete the contents of /private/var/folders by hand. The temp files worth cleaning yourself are app-generated ones: interrupted downloads in Downloads, Final Cut Pro render files, Xcode DerivedData, and app caches in ~/Library/Caches. MacCove Space groups leftover caches and temporary files by app and marks which ones are safe to remove.
Where temporary files live on a Mac
| Location | What's in it | Cleaned automatically? |
|---|---|---|
| /private/tmp (also reachable as /tmp) | Short-lived files from command-line tools and system services | Yes. Items untouched for 3 days are removed daily |
| /private/var/folders/…/T | Your user account's temporary folder (what apps get when they ask for a temp folder) | Yes, at startup and periodically |
| /private/var/folders/…/C | Per-user caches used by macOS and apps | Managed by macOS |
| ~/Library/Caches | App caches | Partly. macOS removes some when space is low |
| Inside apps' own folders | Render files, scratch files, build products | No, these are up to each app |
If you're curious, you can open your temporary folder by typing open $TMPDIR in Terminal. Look, but don't clear it out.
How macOS cleans up temporary files itself
You don't need to empty macOS's temp folders, because macOS does it for you:
A system job runs every night and removes files in /tmp that haven't been accessed, modified or changed for more than three days.
Another system helper cleans the per-user temporary folders under /private/var/folders at startup and on a daily schedule.
When your disk is running low, macOS also clears caches and logs that are safe to delete, including temporary database files, interrupted downloads, and staged macOS and app updates.
That's why a restart is the right way to clear system temp files. It closes every app that might be using them, and lets macOS's own cleanup run. If your Mac has been running for weeks, a restart alone can recover a few gigabytes.
Why you shouldn't delete /private/var/folders yourself
It's tempting, especially after reading old forum advice, to delete everything in /private/var/folders. Don't. Running apps and system services keep files open there, including caches that macOS expects to exist. Deleting them while the Mac is running can make apps crash, lose unsaved state, or rebuild caches from scratch, and macOS would have removed anything stale on its own anyway.
The temporary files you should clean up
The temp files that actually waste space on a Mac are created by apps, and most apps don't clean up after themselves.
| App or source | What builds up | How to remove it safely |
|---|---|---|
| Browsers | Interrupted downloads (.crdownload in Chrome, .download in Safari) | Delete them from Downloads when no download is running |
| Final Cut Pro | Render, optimized and proxy media | File → Delete Generated Library Files (originals are kept and render files can be regenerated) |
| Xcode | Build products in DerivedData | Delete ~/Library/Developer/Xcode/DerivedData; it's rebuilt on the next build |
| Photoshop and other creative apps | Scratch and temp files | Quit the app normally so it removes them; check its scratch disk settings |
| Installers | .dmg and .pkg files you've already installed | Delete from Downloads |
| App caches | Cached data in ~/Library/Caches | Quit the app, then delete the folder's contents |
Final Cut Pro is worth singling out. Render files for a single project can run to tens of gigabytes, and they're entirely regenerable. Apple's own menu command removes them for an event, project or whole library, and leaves your original footage untouched.
How to delete app temp files and caches
Quit the apps you're cleaning up after.
In Finder, press ⇧⌘G and go to ~/Library/Caches.
Turn on Calculate all sizes (List view, ⌘J) and sort by Size.
Delete the contents of folders belonging to large apps or apps you've uninstalled.
Check Downloads for old installers and interrupted downloads.
Empty the Trash and restart.
Working out which folder belongs to which app is the slow part, because many are named like com.developer.helper rather than after the app. MacCove Space does that matching for you. It groups caches, logs, developer data and leftovers by app, marks each item Safe, Review or Caution, and sends what you remove to the Trash so you can undo the clean. For a deeper look at caches, see how to clear cache on a Mac.
Coming from Windows: %temp% vs Mac
| Windows | Mac equivalent |
|---|---|
| %temp% (C:\Users\you\AppData\Local\Temp) | $TMPDIR in /private/var/folders (cleaned automatically) |
| C:\Windows\Temp | /private/tmp (cleaned automatically) |
| Disk Cleanup → Temporary files | Restart; System Settings → General → Storage |
| AppData\Local caches | ~/Library/Caches |
| Prefetch | No equivalent to clear |
FAQs
Does restarting a Mac delete temporary files?
Yes, mostly. Restarting closes everything that's using temporary files and triggers macOS's cleanup of the per-user temporary folders. It won't remove app-specific files like render files or caches.
Is it safe to delete files in /private/var/folders?
Not while your Mac is running. macOS manages that folder and removes stale items itself. Restart instead.
Where is the temp folder on a Mac?
Each user has one inside /private/var/folders. To open yours, run open $TMPDIR in Terminal. The system-wide one is /private/tmp.
How much space do temporary files take on a Mac?
System temp folders are usually small, often under a gigabyte, because they're cleaned regularly. App-generated temp files are a different story: render files, build products and caches can add up to tens of gigabytes.
Related guides
How to Clear Cache on a Mac
How to Clear System Data on a Mac
How to Free Up Disk Space on a Mac