Is it safe to delete /private/var/folders on a Mac?
- No, not by hand. It holds every account’s temporary folder and a second cache folder, both in use right now by running apps and macOS services. Deleting from it underneath them can make them fail until you restart.
- What to do instead: let macOS clear it. Apple documents that temporary files untouched for three days may be removed by the system, and that the cache folder is emptied when the Mac starts up in safe mode.
- Does it come back? All the time: everything that runs uses it, so it’s never empty, and isn’t meant to be.
- SiftMac’s verdict: Leave it
1. What it is
Each account on the Mac gets a private set of folders under /private/var/folders, at a path that looks random, such as /private/var/folders/xy/a1b2c3…/. Inside are three folders:
- **
T**: the temporary folder, the one theTMPDIRvariable points to. Apps keep scratch files here while they work. - **
C**: a cache folder for apps and macOS services, which macOS doesn’t clean on a schedule. - **
0**: a per-user folder some system services use.
Apple’s documentation for these folders says files in the temporary one may be cleaned by the system once they haven’t been accessed for three days, and that files in the cache one are removed during a safe-mode startup. macOS runs that cleanup as it starts up and again every night.
/var/folders and /private/var/folders are the same place: /var is a link to /private/var.
2. Where it is
/private/var/folders
echo $TMPDIR
getconf DARWIN_USER_CACHE_DIR
The last two commands print your own temporary and cache folders. Folders for other accounts and for system services sit beside yours, and you can’t open them.
3. How big it gets
Measure your own two folders:
du -sh $TMPDIR $(getconf DARWIN_USER_CACHE_DIR)
If one of them holds many gigabytes, look inside for the folder or files of a single app and deal with that app. Some apps leave large files in their temporary folder after they quit, such as AI models compiled by ONNX Runtime.
4. What to do instead of deleting it
- Restart. Apps that were running let go of their temporary files, and macOS’s cleanup runs as the Mac starts up.
- If one app’s folder in
TorCis huge, quit that app, then move just that folder, or those files, to the Trash. The name usually says which app it is. - To empty the cache folder, start up in safe mode once, then restart normally.
Never run rm -rf on /private/var/folders, with or without sudo. It deletes files that background services have open, along with other accounts’ files.
5. What happens afterwards
- After a restart, the temporary files of apps that were running are gone, and apps create new ones as they need them.
- After safe mode, apps and services rebuild their caches in
C; things like Quick Look previews may take a moment longer the first time. - The folders never stay small for long, because they’re working space. That’s expected.
Questions
Is it safe to delete /private/var/folders?
Not by hand. It’s working space for apps and macOS services that are running now. A restart and macOS’s own cleanup deal with old temporary files, and safe mode clears the cache part.
What are the T, C and 0 folders?
T is your temporary folder, C a cache folder, and 0 a folder for system services. macOS cleans T itself and empties C during a safe-mode startup.
Why is /private/var/folders so big?
Usually because of one app’s files. Find it with the du command above, quit that app, and remove only its folder, or restart and let macOS clean up.
Does /tmp work the same way?
Similarly, but it’s shared: /tmp, really /private/tmp, serves every account, and macOS’s daily maintenance deletes files there that haven’t been accessed for three days.
How SiftMac handles it. SiftMac leaves /private/var/folders to macOS, with one exception in your own temporary folder: AI models compiled by ONNX Runtime that an app left behind after it quit. Their names carry the ID of the process that made them, so ones whose process still runs are marked in use and left alone; the rest are listed as Leftover temp files and deleted, since nothing needs them.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works