How to clean up temp files on Mac
A Mac keeps temporary files in three places: /private/tmp, a per-user folder under /private/var/folders, and the caches in ~/Library/Caches. macOS clears the first two by itself, so the cleanup that is worth doing by hand is short: restart the Mac, then delete the contents of ~/Library/Caches and your browser cache. This guide shows where each kind of temp file is, how to delete it, and what to leave alone.
1. Where temp files are on a Mac
A Mac has no single Temp folder like the one on Windows. Temporary data is split by who owns it:
| Folder | What is in it |
|---|---|
/private/tmp | Scratch files shared by every user and by command-line tools. /tmp is a shortcut to the same folder. |
/private/var/folders/…/T | Your own temporary folder. Apps you run put their working files here. The middle of the path is a random-looking name that is different for each account; the Terminal variable $TMPDIR holds the full path. |
/private/var/folders/…/C | Per-user caches kept by macOS and its services, next to the folder above. |
~/Library/Caches | App caches: thumbnails, downloaded images, update files. One folder per app, mostly named after the app's bundle identifier. This is usually the biggest of the four. |
~/Library/Logs | Log files from apps. Not temporary in the strict sense, but safe to delete and often counted with them. |
/private and ~/Library are both hidden in Finder. To open one, press ⇧ ⌘ G in Finder, type the path and press Return. More ways in are in how to find the Library folder on Mac.
2. What macOS cleans up by itself
You rarely need to empty the system temp folders. macOS ships with two background jobs for it:
/tmp: a job calledtmp_cleanerhas been part of macOS since version 14. Its manual page says it checks/tmpevery day and removes content that has not been modified recently.- Your temporary folder: a system helper named
dirhelpercreates the folders under/private/var/foldersand is scheduled to run every night. On macOS 27 its job is configured for files older than three days.
Apps are also expected to remove their own temporary files when they quit. That is why the first step of any cleanup is simple: save your work and restart the Mac. Every app closes, files that were in use are released, and the cleanup jobs can remove what is left.
Don't empty /private/var/folders by hand. Running apps and macOS itself keep files there that they expect to find again, and deleting them can make apps misbehave until the next restart.
3. Delete app caches in Finder
The caches in your Library are the part macOS does not clear on a schedule. Apps rebuild what they need, so deleting them is safe, but the apps will start a little slower the first time.
- Quit the apps you have open.
- In Finder, press ⇧ ⌘ G, type
~/Library/Cachesand press Return. - Switch to list view with ⌘ 2. To see which folders are worth the trouble, choose View › Show View Options (⌘ J), tick Calculate all sizes and sort by Size.
- Open a large folder, select what is inside and press ⌘ ⌫. Delete the contents and keep the folder itself, so the app finds it where it expects it.
- Restart, check that your apps work, then empty the Trash. The space only comes back at that point (where to find the Trash on Mac).
Log files work the same way: open ~/Library/Logs and move old ones to the Trash. Leave the rest of the Library alone. Folders such as Application Support, Containers and Preferences hold settings and data, not temporary files.
4. Clear the browser cache
Browsers keep copies of pages and images so sites load faster, and that cache is often the largest temporary data on a Mac.
- Safari: choose Safari › Settings › Advanced and tick Show features for web developers. A Develop menu appears in the menu bar; choose Develop › Empty Caches. This removes cached page data only. History and website logins stay.
- Chrome: click the three-dot More menu, choose Delete browsing data, pick a time range, tick Cached images and files and click Delete data. Untick cookies if you want to stay signed in to websites.
5. Storage settings and safe mode
Open System Settings › General › Storage to see what is using the disk (how to find storage on Mac and check folder sizes covers that pane). Temporary files and caches are counted under System Data, a category Apple says cannot be managed directly, so the number there only goes down when you clear the folders above. The same pane offers Empty Trash automatically, which removes items that have been in the Trash for more than 30 days.
If the disk is so full that the Mac struggles, Apple suggests starting up in safe mode: the Mac then clears certain system caches, which are created again as needed. Restart normally afterwards. Apple's support page "Start up your Mac in safe mode" has the steps for your model.
When temp files turn out to be small, the space is somewhere else. How to find large files on Mac lists the usual suspects, and old installers are covered in DMG files on Mac.
6. Find temp files with Terminal
These commands only look. None of them deletes anything:
# the path of your own temporary folder
echo $TMPDIR
# open it, or the shared one, in Finder
open $TMPDIR
open /private/tmp
# how much space each temp location uses
du -sh $TMPDIR /private/tmp ~/Library/Caches ~/Library/Logs 2>/dev/null
# which app caches are the biggest
du -sh ~/Library/Caches/* 2>/dev/null | sort -rh | head -15
Some folders print "Operation not permitted" because macOS protects them; the totals for the rest are still correct.
7. Find leftover temp files with Everything Locator
Not every temporary file lives in a temp folder. Unfinished downloads, files an app left behind after a crash and old logs sit among your documents, where no cleanup job looks. Everything Locator (free to try) indexes the folders you grant it and searches them by name, type, size and date as you type. Here the search is by name and path; its content: search asks Spotlight, which leaves out most of ~/Library. For anything under ~/Library, first open Settings › Indexing, tick Index hidden files and folders and choose Apply and Rebuild Index.
| Search | Finds |
|---|---|
ext:tmp;temp | files ending in .tmp or .temp anywhere in the indexed folders |
ext:tmp;temp !dm:thismonth | the same, leaving out any changed this month, which an app may still be using |
ext:crdownload;download;part | downloads that Chrome, Safari or Firefox started and never finished |
startwith:~$ | the small lock files Microsoft Office keeps next to an open document; any that remain after the document is closed are leftovers |
~/Library/Caches/ size:>100mb | the cache files that take real space (sort by size with ⌘ 3) |
folder: parent:~/Library/Caches | the cache folder of each app, to spot apps you no longer have |
~/Library/Logs/ ext:log dm:<2026 | log files not changed since 2025 |
ext:log size:>50mb | oversized log files anywhere |
Press Space to preview a result and ⌘ Return to show it in Finder. ⌘ ⌫ moves the selected files to the Trash, and ⌘ Z puts them back.
FAQ
Where is the Temp folder on a Mac?
There are two. /private/tmp is shared by all users, and each account has its own under /private/var/folders. Type open $TMPDIR in Terminal to open yours in Finder.
Is it safe to delete temp files on a Mac?
The contents of ~/Library/Caches and ~/Library/Logs are safe to delete once you have quit your apps. Leave /private/var/folders to macOS, and restart instead.
Does restarting a Mac clear temp files?
It helps. Apps remove their own temporary files as they quit, and nothing is holding the rest open any more, so the daily cleanup jobs can remove them. Starting up in safe mode goes further and clears certain system caches.
How do I clear temp files on a Mac without an app?
Restart, empty the folders inside ~/Library/Caches in Finder, clear the cache in your browser, and empty the Trash. Nothing has to be installed for any of it.
Why is System Data so large in Storage settings?
System Data includes caches, logs and temporary files, along with other data macOS manages for itself. Clearing your caches and restarting reduces it; the rest cannot be managed directly.
Find leftover files in a second
Everything Locator searches your whole Mac by name, type, size and date as you type.