Is /private/var/folders Safe to Delete on Mac?

On this page
- What is /private/var/folders?
- What does macOS clean in it on its own?
- How to find your own folders inside it
- How big is /private/var/folders on your Mac?
- What /private/var/folders held on my Mac
- Why does /private/var/folders get so big?
- Is it safe to delete /private/var/folders?
- The safe way to clear /private/var/folders
- What not to do
- What about the other folders in /private/var?
- Why it often counts as System Data
- How to keep it small
- Questions about /private/var/folders
- How Purgy treats /private/var/folders
Quick answer: No, not the whole folder. macOS and running apps use /private/var/folders all the time. Your own temporary files there are cleaned by macOS after 3 days without use, and Safe Mode removes your cache folder there. If it is still big, quit your apps and clear only your own C and T folders.
Tested on: MacBook Air M1, 16 GB, macOS 27.0.1, on 23 November 2026. I measured the folder with
du,getconfandlsin Terminal, without administrator rights, and read theconfstrmanual page on the same Mac. I did not delete anything or restart to test the cleanup.
If you have measured your disk with a tool that shows hidden folders, /private/var/folders may have stood out. The name gives nothing away, and the folders inside have random-looking names.
This guide explains what it is, what it held on my Mac, why it grows, and how to shrink it without breaking anything.
What is /private/var/folders?
It is where macOS gives each user account a private place for caches and temporary files. Apps and system services write here instead of cluttering your home folder.
You may also see it written as /var/folders. On my Mac, ls -l /var shows that /var is a link to private/var, so both names point to the same place.
Inside, each account has a folder with a two-letter name and a long random one. Mine is /var/folders/9f/y8zgrw…/. On my Mac it holds these parts:
C, caches: data apps and system services keep to work faster, such as thumbnails and compiled code.getconf DARWIN_USER_CACHE_DIRprints its path.T, temporary files: files apps create while they work. This is the folder your$TMPDIRpoints to.0, your user folder: the pathgetconf DARWIN_USER_DIRprints. System services keep per-user data here. Leave it alone.X: on my Mac it held only two browser folders, covered below.
There was also an empty folder named Cleanup At Startup.
/private/var/folders. One random-looking folder per user, with its main parts.What does macOS clean in it on its own?
Apple answers this in the confstr manual page, which you can read with man confstr. The rules differ for the two folders you care about.
- Temporary files in
T: the manual says files there "may be cleaned (removed) by the system if they are not accessed in 3 days." - Caches in
C: the manual calls it a place for user cache data that "will not be automatically cleaned by the system", and adds that its files are removed during safe boot.
So old temporary files take care of themselves. Caches stay until the app that made them trims them, or until you start up in Safe Mode.
How to find your own folders inside it
You do not need to guess which random folder is yours. macOS will tell you the exact paths in Terminal:
getconf DARWIN_USER_CACHE_DIR
getconf DARWIN_USER_TEMP_DIR
The first prints your C folder. The second prints your T folder. To open either in Finder, run open followed by the path, for example open "$(getconf DARWIN_USER_TEMP_DIR)".
How big is /private/var/folders on your Mac?
The whole folder includes other users and system accounts, so measuring all of it accurately needs administrator rights:
sudo du -sh /private/var/folders
Your own parts can be measured without sudo, and they are the parts you can do something about:
du -sh "$(getconf DARWIN_USER_CACHE_DIR)" "$(getconf DARWIN_USER_TEMP_DIR)"
To see which apps use the most space inside your cache folder:
du -sh "$(getconf DARWIN_USER_CACHE_DIR)"* | sort -hr | head
Folder names usually match the app's bundle ID, such as com.apple.metal or com.google.Chrome.helper. That makes it easy to see which app is responsible.
Expect some "Operation not permitted" lines, even inside your own folder. On my Mac, du could not read Safari's WebKit folders, Shortcuts caches or the Quick Look thumbnail cache. macOS protects them, so the totals leave those out.
What /private/var/folders held on my Mac
I measured it on 23 November 2026 without administrator rights. The whole folder showed 3.9 GB, and almost all of it sat in my own folder.
| Part | Size (du -sh) | Biggest item inside |
|---|---|---|
C (caches) | 984 MB | clang, 589 MB |
T (temporary files) | 41 MB | Many small folders |
X | 2.9 GB | com.google.Chrome.code_sign_clone, 2.9 GB |
0 (user folder) | 12 MB | Mostly unreadable without permission |
Whole /private/var/folders | 3.9 GB | Other accounts' folders were not readable |
In the cache folder, clang at 589 MB held a single ModuleCache folder, which the clang compiler fills when it builds code. After it came Chrome's helper at 95 MB, Python at 58 MB and Metal shader caches at 55 MB.
The 2.9 GB that was not really there
The X folder looked like the biggest part. It held one item for Chrome, and du counted it at 2.9 GB, the same as /Applications/Google Chrome.app on my Mac.
Chromium's source code explains it. Its code_sign_clone_manager.h file describes a temporary copy-on-write clone of the app bundle, made so a running browser keeps working after an update is staged. It says the clone normally takes "no extra disk space", and that the browser deletes it itself.
So do not delete it to win back space. du counts the clone in full, but on APFS it shares its data with the real app.
Why does /private/var/folders get so big?
Most of the time it stays small. When it grows, these are the usual places to look.
- Caches nobody trims: the manual page says your cache folder is not cleaned automatically, so a cache grows until its app trims it.
- Developer tools: compilers keep caches here, separate from their main cache folders. On my Mac,
clangwas 60 percent of the cache folder. - Large temporary files still in use: a file an app keeps opening is never 3 days unused, so it stays until the app lets go.
- Thumbnail and preview caches: Quick Look keeps the previews Finder makes of your files in your cache folder.
Is it safe to delete /private/var/folders?
Not as a whole, and not while apps are running. Here is why.
Apps keep files open in these folders while they work. If you delete them underneath a running app, it can fail or lose what it was doing. The 0 folder holds data system services use for your account.
The contents of C and T are not precious, though. They are cache or temporary data. The risk is the timing, not the data.
So the safe approach is to let macOS clean it, or to clean only your own C and T folders after quitting your apps.
The safe way to clear /private/var/folders
Work through these in order. Many people only need the first step.
1. Quit your apps and restart your Mac
Quitting releases the temporary files apps hold open, so macOS can remove the ones left unused for 3 days. Not tested here: I did not restart this Mac to measure how much a restart frees.
2. Start up in Safe Mode once
Apple's guide to freeing up storage space on Mac says Safe Mode clears certain system caches, which macOS creates again as needed. The confstr manual adds that your cache folder here is cleared during safe boot. Restart normally afterwards.
3. Clear your own cache and temp folders
If the folder is still large, clear just your parts by hand. Save your work and quit every app first, including ones in the menu bar.
- Run
open "$(getconf DARWIN_USER_TEMP_DIR)"to open your temp folder in Finder. - Select the large items inside it and move them to the Trash. Do not move the folder itself.
- Do the same for your cache folder with
open "$(getconf DARWIN_USER_CACHE_DIR)". - Empty the Trash, then restart.
If Finder says an item is in use, skip it. It belongs to something still running.
What not to do
A few shortcuts appear in old forum posts. They cause more trouble than they save.
- Do not run
sudo rm -rf /private/var/folders/*: it removes files for every user and system service at once, while they are running. - Do not delete the
0folder: it is the per-user folder system services use for your account. - Do not change permissions in this folder: the manual page says macOS creates your
CandTfolders with 0700 access, meaning only you can open them. Leave it that way.
What about the other folders in /private/var?
When people find /private/var/folders, they often notice its neighbours too. These are part of macOS as well.
/private/var/vm: on my Mac it held one file, the 2 GBsleepimageused when the Mac sleeps. Leave it alone./System/Volumes/VM: this is where my Mac kept its swap files: 14 files of 1 GB each when I looked. Older guides put swap in/private/var/vm./private/var/log: system log files. Leave them to macOS; our guide to Mac log files covers the ones you can clear./private/var/db: system databases. Purgy treats this folder as locked and never offers to clear it.
Swap grows when your Mac runs short of memory for what you have open. Our guide to clearing RAM on Mac shows how to check memory pressure and what brings swap down.
Why it often counts as System Data
macOS does not show /private/var/folders in Finder, and it does not belong to any normal category. In Storage settings, its size falls into System Data.
If System Data is still large, other hidden folders are probably involved. See what System Data is on Mac and how to clear System Data for the usual causes, such as snapshots and old backups.
Developers often find their own tools are behind a large cache folder. Our guides to Docker disk space and Homebrew cleanup cover two common ones.
How to keep it small
You do not need to clean this folder by hand on a regular basis. Two habits keep it under control.
- Quit heavy apps when you are done: files they release can then age out of your temp folder.
- Check your cache folder now and then: the
ducommand above shows whether one tool's cache keeps growing.
Questions about /private/var/folders
These are the questions that come up most about this folder.
Is /private/var/folders a virus or malware?
No. It is a normal part of macOS on every Mac. The random folder names are created by the system, not by anything harmful.
Why are the folder names random?
macOS names them, one per account, and the names are meant for the system, not for people. Use getconf to find yours instead of guessing.
Will deleting it log me out or delete my files?
It will not delete your documents, which live in your home folder. Deleting parts while apps run can make those apps fail until they restart, which is why the steps above quit apps first.
Does macOS clean this folder automatically?
Partly. The confstr manual page says temporary files unused for 3 days may be removed by the system. Your cache folder is not cleaned automatically, but Safe Mode clears it.
Why did the folder grow again after I cleaned it?
Apps rebuild their caches as you use them, so some growth is normal. If it grows back to many gigabytes within days, one app is usually responsible. The du command above shows which one.
Can I move /private/var/folders to another drive?
No. It is part of the system and stays on your startup disk. Let macOS clean it, and clear your own parts when you need to.
How Purgy treats /private/var/folders
Because macOS and running apps write to /private/var/folders all the time, Purgy does not clear it. The safe way to empty it is the one described above.
There is one exception. Your Quick Look thumbnail cache lives in your own cache folder there. It only holds the previews Finder makes of your files, so Purgy lists it under System caches and frees it with the rest. Finder makes new previews as you browse.
For the space this folder adds to System Data, Purgy offers better targets:
- The System Data screen breaks that figure into snapshots, iPhone backups, AI models, caches and developer data, and names the parts that belong to macOS.
- The caches apps keep in your Library are cleared in one click, because they rebuild. Your own files go to the Trash instead, so you can put them back.
If /private/var/folders stays big, the Space map lets you browse from Macintosh HD into the folders you can read. See what is inside your System Data with the free trial.