Temporary files · free up space
How to delete temporary files on a Mac
Restart your Mac: macOS clears most of its own temporary folder, /private/var/folders, at startup, and deleting from it by hand while apps are running can crash them. The temporary files you can delete yourself are app caches in ~/Library/Caches and logs in ~/Library/Logs. Quit your apps first, move the contents to the Trash, and empty it.
Where a Mac keeps temporary files
/private/var/folders— macOS's own temporary and per-user cache area. Your apps' temporary folder, the one Terminal calls$TMPDIR, is inside it. Running apps have files open here.~/Library/Caches— what apps keep to start and load faster. Regenerated as needed.~/Library/Logs— your own logs and crash reports. Only needed when you are chasing a bug.- The Trash — not temporary, but the place everything above goes before it frees anything.
To see what they hold, in Terminal:
du -sh "$TMPDIR" ~/Library/Caches ~/Library/Logs 2>/dev/nullThe first figure is your temporary folder, the second your caches, the third your logs.echo $TMPDIR prints the temporary folder's full path, which is a long string of letters under /var/folders.
macOS's own temporary files: restart
Leave /private/var/folders to macOS. Apps, including the ones running in the background, have files open in it while they run, and removing those from under them can make them crash or lose what they were doing. A restart is the safe way to clear it: macOS clears most of that folder at startup. If it is still large afterwards, Apple's own suggestion for freeing space this way is to start up in safe mode, which clears certain system caches that are created again as needed, then restart normally.
Caches and logs: by hand
- Quit every app you can. A running app rewrites its cache while you delete it.
- In Finder, press Shift-Command-G, go to
~/Library/Caches, and move the folders inside it to the Trash. Delete the contents, not theCachesfolder itself. - Do the same in
~/Library/Logs, unless you are in the middle of reporting a crash. - Empty the Trash, and restart.
Caches come back as you use your apps, which is what they are for. The full steps, including browsers and the hidden ~/.cache folder that command-line tools use, are on how to clear the cache on a Mac.
What not to delete
- Anything in
/Systemor/private/varother than through a restart. Most of it is protected anyway, and the rest belongs to macOS. - The
CachesandLogsfolders themselves. Empty them; do not remove them. - Folders in
~/Library/Application Support, which can look like temporary data and are often the only copy of an app's data. See the leftover files after uninstalling an app for how to tell.
If the space you are chasing is shown as System Datain Storage settings, temporary files and caches are part of it, but rarely all of it.
Where the app comes in
RefreshYourMac measures each of these separately. macOS Temp Data, the /private/var/folders area, is rated Protected: shown for its size with the advice to restart, never deleted. Application Caches and System & App Logs are rated Safe for auto removal and can be cleared on a schedule. Leftover Browser Copies, also Safe, takes the spare copies of Chrome left in the temporary folder when it is force-quit, crashes or updates while open, which a restart does not remove. The Mac App Store edition has Application Caches and System & App Logs once you allow those folders in Settings → Folders; the other two are in the download.
What to do next: see these numbers for your own Mac. Download RefreshYourMac free, or get it on the Mac App Store.
What it costs to have an app do this
| RefreshYourMac | CleanMyMac | MacKeeper | |
|---|---|---|---|
| Pay once | $24.99 | €119.95 on MacPaw’s store; $89.99 for CleanMyMac X on the Mac App Store | subscription only |
| Yearly | $14.99 a year, first 7 days free | $39.99/yr; €19.91/yr for the cleaning-only Essential Trio | €71.40 for the first year, 1 Mac. Their page shows it against a €119.40 list price |
| Monthly | $1.99 a month | $9.99/mo | €10.95/mo |
| Account needed | No | Yes | Yes |
Before you pay anything, both versions give you 3 free scans. CleanMyMac and MacKeeper prices read from their own pages and the Mac App Store on 27 October 2026; the full comparison is at RefreshYourMac vs CleanMyMac and MacKeeper.
Frequently asked questions
Is it safe to delete temporary files on a Mac?
App caches in ~/Library/Caches and logs in ~/Library/Logs, yes, once the apps are quit: they are recreated as needed. macOS’s own temporary folder, /private/var/folders, is not one to empty by hand, because running apps have files open in it. Restart instead, and macOS clears most of it at startup.
Where are temporary files stored on a Mac?
macOS keeps its own in /private/var/folders, where each user’s temporary folder ($TMPDIR in Terminal) sits. Apps keep caches in ~/Library/Caches and logs in ~/Library/Logs.
Does restarting a Mac delete temporary files?
Most of them. macOS clears most of /private/var/folders at startup. Starting up in safe mode, then restarting normally, also clears certain system caches, which are created again as needed. App caches in ~/Library/Caches are not cleared by a restart.