
Temporary files on a Mac are working files that apps, installers and macOS create for one task and are meant to remove when it's done. Most of them live in hidden folders you never see: a private temporary folder for your account inside /, and a shared one at /.
macOS clears both by itself. Every day it removes items in those folders that nothing has used for three days. When space runs low, it also clears temporary database files, interrupted downloads and staged updates, and safe mode clears some system caches as well.
So you rarely need to delete temporary files yourself, and doing it while apps are running can lose work.
When they do take a lot of space, the cause is usually one app writing faster than macOS clears, or a download or update that never finished. The fix is to deal with that app and restart, not to empty the folder.
This post maps every place temporary files live on a Mac, how and when macOS clears each one, what's safe to remove yourself, and what to do when they grow. The per-user folder has its own deep dive in /private/var/folders on a Mac.
What temporary files are on a Mac
A temporary file exists only because something is in progress: a document being saved, an archive being expanded, an installer unpacking, a download arriving. When the job finishes, the file has no further use.
What counts as a temporary file?
The everyday examples are mostly invisible. When an app saves a document safely, it often writes the new version to a temporary folder first, then swaps it in for the old one. Apple's developer documentation recommends that pattern as the way to replace a file without losing data.
Other examples:
- Archives being expanded, when you open a .zip file or an installer unpacks its contents.
- Databases at work. Apps that keep a database open write working files next to it while they run.
- Downloads in progress, which have a temporary name until they finish.
- Updates waiting to install, for macOS and for apps that update themselves.
- Copies made so another app can open something, such as an attachment Mail hands to Preview.
How are temporary files different from caches?
The difference is intent. A cache is kept on purpose, so an app can reuse it and work faster next time. A temporary file is kept only until the task is done, and Apple tells developers not to rely on a temporary folder they've made still existing after their app quits.
macOS treats them differently too. Its manual describes each account's temporary folder as a good place for temporary files, which may be removed if they're not used for three days. It describes the cache folder next to it as one the system won't clean automatically.
Many cleanup guides use the two words as if they meant the same thing. They don't, and the difference decides what macOS removes for you.
| Temporary files | Caches | Swap files | |
|---|---|---|---|
| Why they exist | A task in progress | To make an app faster next time | Memory that didn't fit in RAM |
| How long they're needed | Until the task ends | As long as the app finds them useful | Until memory frees up |
| Main location | /private/var/folders, /private/tmp | ~/Library/Caches | /private/var/vm |
| Who removes them | The app, then macOS after three days | The app, or you | macOS; a restart clears them |
| Remove them yourself? | No, leave them to macOS | Yes, with the app quit | No |
Where do temporary files show up in Storage settings?
In System Data. Choose Apple menu › System Settings, click General, then Storage. Apple describes System Data as files that don't fall into the other categories, and says you can't manage its contents there.
The exceptions are temporary files inside your home folder, such as unfinished downloads in Downloads. Storage settings counts those under Documents, where you can find and delete them.

Where temporary files live on a Mac
There's no single temporary folder. macOS gives each account its own, keeps a shared one, and lets apps and updaters keep theirs in a few other places.
| Location | What goes there | Cleared by | Level |
|---|---|---|---|
/private/var/folders/…/T | Your apps' temporary items | macOS, after three days unused | Managed by macOS |
/private/tmp | Shared files of installers and tools | macOS daily, after three days unused | Managed by macOS |
/private/var/tmp | Temporary files kept across restarts | Not by the daily cleanup | Leave it |
~/Downloads | Unfinished browser downloads | You | Your choice |
/Library/Updates | Software Update's files | Software Update | Managed by macOS |
~/Library/Caches | App updates waiting to install | The updater, or you | Safe |
| Mail's container | Copies of opened attachments | Mail, per its setting | Usually safe |
/private/var/vm | Swap files and the sleep image | macOS; a restart clears swap | Managed by macOS |
Your account's private temporary folder
Each account has a folder inside /, two levels down, with a long random name. Inside it, a folder named T holds the account's temporary items. macOS creates it readable only by its owner, so other people on the Mac can't see what your apps put there.
Most Mac apps never choose a temporary folder themselves. They ask macOS for one, and macOS hands them this one. Command-line tools find it through a setting called TMPDIR, which points to the same place.
The folder next to it, named C, holds caches, not temporary files, and the three-day rule doesn't apply to it. That's often why the whole folder is larger than people expect. The post on /private/var/folders explains every part and how to find your own.
The shared /tmp folder
/ is a link to /: the same folder under two names. Every account and every process can write there. Installers, command-line tools and some apps use it for files they need briefly.
It's hidden in Finder. To look inside, choose Go › Go to Folder, type / and press Return. Finder accepts / as well, and opens the same folder.
To see how much it holds, go to / the same way, select the tmp folder, and choose File › Get Info. What you see depends on what's running; often it's a handful of small items with generated names.
What is /private/var/tmp?
macOS's own manual describes / as the place for temporary files that are kept between system restarts, for tools that need a file to survive one.
The daily cleanup that empties old items from / doesn't look here. Leave it to the tools that use it.
Unfinished downloads
A browser gives a file a temporary name while it downloads, then renames it when it's complete. Safari keeps an unfinished download as a package whose name ends in .download. Chrome uses a name ending in .crdownload. Both sit in your download folder, usually Downloads, next to finished files.
Apple says you can't open an item while Safari is downloading it, and that a paused download can be resumed from the downloads list. If a download is incomplete because the file was damaged, Apple's advice is to download it again.
So a .download or .crdownload file you've given up on is safe to move to the Trash. Check the browser's downloads list first, in case it's still running or you want to resume it.
Updates waiting to install
When Download new updates when available is on in System Settings › General › Software Update, behind the information button next to Automatic Updates, macOS downloads updates before you install them. Those files wait until the update is installed.
Software Update keeps some of them in /, which System Integrity Protection protects, so only Software Update can change it. Installing pending updates lets macOS remove the files it no longer needs. Apple also lists staged macOS and app updates among what macOS clears when space is needed.
Apps from outside the App Store often update themselves and keep their downloads in your Caches folder:
- Sparkle, used by many Mac apps, keeps them in a folder named org.sparkle-project.Sparkle inside the app's cache folder, and removes items older than 10 days on its own.
- Squirrel, used by many apps built with Electron, keeps them in a folder ending in .ShipIt, and installs the update when you quit the app.
- electron-updater keeps them in a pending folder inside a cache folder whose name ends in -updater.
- Google Updater keeps the last update package it downloaded for Chrome and each other Google app, at most one per app, so later updates can be smaller.
All four are Safe: if an update was waiting, the app downloads it again the next time it checks. Removing Google Updater's packages only means the next update of each Google app may download in full.
Temporary copies of attachments
When you open an attachment in Mail, Mail saves a temporary copy in a Mail Downloads folder so another app can open it. By default, Mail deletes the copy when you delete the message. Copies from messages you keep stay, and so do copies you edited.
To choose when Mail removes them, open Mail › Settings, click General, and change Remove unedited downloads. An edited copy may be the only one with your changes, so check before you clear the folder by hand.
Swap files and the sleep image
These aren't temporary files in the usual sense, but they behave like them and often get grouped with them. When apps need more memory than your Mac has, macOS moves some of it to swap files on the disk, and it can save memory to a sleep image.
macOS creates, grows and removes these files itself, and the catalog rates them Managed by macOS. Restarting clears the swap files. Activity Monitor shows how much is in use as Swap Used, in its Memory tab. The post on swap files and the sleep image explains why they grow.
How macOS clears temporary files by itself
macOS has several ways of clearing temporary files, and each reaches a different part. None is a setting you can change in System Settings.
Every day: the three-day rule
Each day, a macOS job called tmp_cleaner looks through / and removes files that haven't been opened, changed or modified for more than three days, along with old empty folders. Its manual says it first appeared in macOS Sonoma.
Your account's T folder follows a similar rule. macOS's manual says files there may be removed if they aren't accessed for three days, and on macOS 27 the service that looks after these folders runs once a day with a three-day limit.
The rule looks at when a file was last used, not when it was made. A file an app reads every day stays, however old it is, and so does everything written in the last three days.
What if your Mac is asleep when the cleanup is due?
Both jobs are scheduled by launchd, the part of macOS that starts background jobs. Its manual says that, unlike older Unix schedulers, it runs a job the next time the computer wakes if it was asleep at the scheduled time, and runs it once even if several days were missed.
So a Mac that sleeps every night, or a laptop that's closed for a week, still gets cleaned. There's no setting to change when it happens, and none is needed.
When space runs low
Apple says that when space is needed, macOS also clears caches and logs that are safe to delete. Its examples are temporary database files, interrupted downloads, staged macOS and app updates, and Safari's website data, and the list ends with "and more".
There's nothing to turn on: it happens in macOS 27 and macOS 26 alike. Apple doesn't say exactly which folders it reaches, so it's a safety net, not something to plan around when you need space for a specific task.
When you restart
Some cleanup guides say a restart empties the temporary folder. Apple doesn't document that, and the three-day rule is what decides what goes from the T folder and /.
A restart does two useful things. It closes every app, so files they held open are finally released and their space can come back. And it clears the swap files, which is often why System Data looks smaller afterwards.
In safe mode
Apple says starting up in safe mode clears some system caches, including font caches and the kernel cache, and that this can temporarily make more storage space available. macOS's manual adds that files in each account's cache folder in / are removed during safe boot.
On a Mac with Apple silicon, shut down, then press and hold the power button until the startup options appear. Select your startup disk, hold Shift, and click Continue in Safe Mode. On an Intel-based Mac, hold Shift as it starts until the login window appears.
Restart normally to leave safe mode. The caches come back as you use your Mac, so this is a one-off gain for a task that needs room, such as an update.
What changed between macOS versions?
Earlier versions did the same job with scripts macOS inherited from BSD. An Apple engineer described them on Apple's developer forums in 2017, with the same three-day limit, and noted that such details can change between releases.
From macOS Sonoma on, tmp_cleaner does the job. macOS 26 Tahoe and macOS 27 Golden Gate both work this way, list the same things macOS clears when space is needed, and use the same safe mode steps.
| When | What macOS clears | What it leaves |
|---|---|---|
| Every day | Items unused for three days in /private/tmp and your T folder | Anything used recently; caches |
| When space runs low | Safe caches and logs, interrupted downloads, staged updates | Your files |
| At restart | Swap files; files apps held open are released | Temporary items and caches, as far as Apple documents |
| In safe mode | Some system caches; your account's cache folder | Your files and app data |
Is it safe to delete temporary files on a Mac?
Not by hand, in the folders macOS manages. The catalog rates Per-user temporary files and caches and Shared temporary folder (tmp) as Managed by macOS: macOS creates them, apps use them while they run, and macOS clears them on its own.
Most of what's inside is disposable. The trouble is that you can't tell from Finder which files an app is using right now.
What can go wrong?
Removing files that are still in use can make the app or tool that created them fail. An app that was saving a document, an installer that was unpacking, a database that was writing: each can lose work in progress or quit unexpectedly.
Deleting a file an app still has open often frees nothing at first, either. The space comes back only when the app closes the file. That's one more reason a restart works better than a deletion.
Why emptying temporary folders with a command is a bad idea
Some guides tell you to clear these folders with a command typed into Terminal as an administrator. A command like that skips the Trash, can't be undone, and removes every account's files and macOS's own, not just yours.
Fake cleanup guides that ask you to paste commands are also a known way to spread malware. Nothing about temporary files needs a command: the daily cleanup, a restart and safe mode cover it.
What can you safely remove yourself?
A few kinds of temporary file live in ordinary folders and are yours to remove in Finder:
| Item | Remove it yourself? | How |
|---|---|---|
| Unfinished downloads you've given up on | Yes | Move them from Downloads to the Trash |
| App updates waiting in Caches | Yes | Quit the app, move the updater's folder to the Trash |
| Mail Downloads | Yes, after a look | Quit Mail, check for edited copies first |
Items in your T folder or /private/tmp | No | Quit apps and restart |
| Swap files and the sleep image | No | Restart; quit apps that use a lot of memory |
| Software Update's files | No | Install or let Software Update finish |

When temporary files take up a lot of space
Usually they don't. The temporary part of a Mac is small most of the time, and what makes the per-user folder large is often its cache part.
How big should temporary files be?
There's no fixed size, because it depends on what you're doing. A Mac that's exporting video, building software or installing an update holds more temporary data than one that's idle.
- Per-user temporary files and caches1–70 GB · Managed by macOS
- Swap files and sleep image1–20 GB · Managed by macOS
- App updates waiting in Caches0.2–3 GB · Safe
Typical ranges on Macs that have these items, from the research behind the app's catalog. The per-user figure includes the cache folder next to the temporary one, which is usually the larger part. Many Macs have far less.
The top of that range is unusual. When the per-user folder reaches tens of gigabytes, it's usually one app's files, and that app is the thing to fix.
Find the folder that's grown
In Finder, choose Go › Go to Folder, type /, and press Return. Choose View › as List, then View › Show View Options, and select Calculate all sizes. Sort by size and open the largest folders until you reach yours.
Do the same for /. Some folders won't open because you don't have permission. That's a sign they belong to macOS or another account, and a reason to look no further.
Match the folder to an app
Folder names inside T are usually an app's name or its bundle ID, the developer's domain written backwards followed by the app's name. The Date Modified column shows whether something wrote there minutes ago or weeks ago.
A folder that changed minutes ago belongs to an app that's running now. A large one that hasn't changed in days may belong to a job that stopped halfway, or hold files an app still reads, which the three-day rule leaves alone.
Quit the app, then restart
Quit the app the folder belongs to, including any icon it has in the menu bar. Then restart your Mac. That releases files the app held open and clears swap.
Give the daily cleanup a day or two to remove what's left. If you need the space right away, safe mode clears the cache part of the folder as well.
When the same app fills it again
Then the app is doing something on purpose, or something's going wrong inside it. Check whether it has an update, and whether its settings let you choose where it keeps temporary or scratch files. Some video and photo editors do, such as Photoshop with its scratch disks, and can use another disk.
If neither helps, tell the developer. A temporary folder that grows by itself every day is a bug worth reporting, and only they can fix it.
A worked example
Say System Data has grown by tens of gigabytes since last week, and you've been exporting video. In Finder, the folder inside / that belongs to you is the large one, and inside it, T holds a folder named after the video app, changed this morning.
That's the app's working space for the export. If the export is still running, leave it. If it finished or failed, quit the app, restart, and check again the next day: the files are gone, or the folder is down to what the app still reads.
If the folder is back to the same size after the next export, look in the app's settings for where it keeps its working files, and point it at a disk with more room.
When does a large temporary folder need attention?
Only when you need the space. A temporary folder that grows during a big job and shrinks afterwards is doing what it's for. One that grows every day, whatever you're doing, is the case worth chasing.
Mistakes to avoid with temporary files
Most problems with temporary files come from treating them as clutter. These are the mistakes that cost people work or time.
Deleting the folders themselves
Never move /, / or your T folder to the Trash. Apps expect these folders to exist, macOS creates them with particular permissions, and some items inside belong to other accounts and to macOS itself.
Clearing them on a schedule
A tool or script that empties temporary folders every day or at every login gains little. macOS already removes what's old every day, so the only extra items it can remove are recent ones, which are the ones most likely to be in use.
Removing files during an install or update
Installers often unpack into temporary folders while they work. Removing those files midway can make the install fail and leave you starting it again. Let an install finish, or cancel it in the installer, before you look at the space.
Treating caches as temporary files
Guides often put caches and temporary files in one list. Caches are kept on purpose and nothing clears them on a schedule, so they're where real space builds up. They're also safe to clear in your own Library folder, with the app quit, which temporary folders aren't.
Keeping files you want in a temporary folder
Anything saved in / or your T folder can be removed by macOS once it has gone unused for three days. If a tool or a download put something there that you want to keep, move it to your home folder now.
Assuming temporary files are private
Your T folder is readable only by you. / is shared: every account on the Mac can see the names of items in it. Tools that write sensitive files there rely on each file's own permissions to keep it private.
Recovering work from temporary files
People often go looking in temporary folders after a crash, hoping to find an unsaved document. It's rarely where your work is, and the three-day rule means it wouldn't stay there for long anyway.
Where do unsaved documents go on a Mac?
Many apps save your documents automatically as you work, so there's often less to recover than you fear. Open the document and choose File › Revert To › Browse All Versions to see earlier versions macOS kept.
Those versions live in a hidden folder at the top of the disk that macOS manages, not in a temporary folder. Only macOS changes them, and they aren't in your Time Machine backups.
Microsoft Office's AutoRecover files
Word, Excel and PowerPoint save AutoRecover files, by default every 10 minutes. After a crash or power failure, the app normally finds the file and opens it the next time you open the app. Save it straight away if you want to keep it.
Microsoft says the files live inside each app's container in your Library folder, not in a temporary folder. Word's, for example, is in ~/. Closing a document and choosing Don't Save deletes its AutoRecover file.
Microsoft is clear that AutoRecover doesn't replace saving your files. AutoSave, or saving often, does.
Don't count on the temporary folder
Even when an app does keep a working copy in a temporary folder, it has a generated name and may be gone within three days. A Time Machine backup or an app's own recovery feature is the reliable way back.
Temporary files from command-line and developer tools
Developers meet temporary folders more often than anyone, in build logs and error messages. A few facts save time.
Which folder do command-line tools use?
Most use the folder that TMPDIR points to, which is your account's private T folder. Some write to / instead, which every account shares. macOS creates your T folder readable only by you, so it's the better home for anything private.
Why do build tools leave so much behind?
Compilers, test runners and build systems write large intermediate files while they work. When a build is interrupted, or a tool crashes, they may never clean up, and the files stay until the three-day rule catches them.
Some tools also keep caches in the C folder next to T, which nothing clears on a schedule. The posts on system caches and /private/var/folders cover which developer tools put what where.
Can you point tools somewhere else?
Many tools let you choose their temporary or cache folder in their own settings, and a few read it from the environment. Check the tool's documentation before you change it; some expect the system's folder and the cleanup that comes with it.

How the app does it
Wombit is a native Mac app that shows what's using your storage, explains every item in plain language, and clears it safely: Trash first, undoable and logged. It reads only names, sizes and dates, and file names and paths never leave your Mac.
System Data, explained splits System Data into named buckets, such as swap and the sleep image, and shows how much it couldn't explain. Folders macOS didn't let it read are listed, not skipped.
The temporary folders, swap and Software Update's files are Managed by macOS: explained, handled through macOS's own mechanism, and never moved. App updates waiting in your Caches folder are Safe, so they start checked in Cleanup.
/
private/ var/ folders Per-user temporary files and caches
Private temporary folders and caches that macOS creates for each user account, in hidden folders with random names.
Managed by macOS · Explained only: never removed
/
private/ tmp A folder shared by all users where apps, installers and command-line tools put short-lived files.
Managed by macOS · Explained only: never removed
/
private/ var/ vm Disk space macOS uses as extra memory when RAM runs low, and a copy of memory it can save before a long sleep.
Managed by macOS · Explained only: never removed
~/
Library/ Caches/ *.ShipIt Squirrel update files (ShipIt)
Updates that apps built with Electron, such as VS Code, downloaded and staged here before installing them, plus the updater's logs.
Safe · Moves it to the Trash
~/
Library/ Caches/ */ org.sparkle-project.Sparkle Updates that apps using the Sparkle framework downloaded and prepared for installation.
Safe · Moves it to the Trash
The analyzer, the map, the explanations and System Data explained are free. Cleanup, What Changed and alerts when space runs low are PRO: one payment of $4.99 with lifetime access. Every Pro tool's review is free to open, so you see what would go and why before you buy.
Frequently asked questions
Where are temporary files stored on a Mac?
Mostly in two hidden folders: a private temporary folder for your account inside /private/var/folders, and a shared one at /private/tmp. Unfinished downloads sit in your Downloads folder, and apps that update themselves keep waiting updates in your Library's Caches folder.
How do I delete temporary files on my Mac?
For the folders macOS manages, you don't: it removes items nobody has used for three days, every day. Quit apps and restart if they've grown, and use safe mode when you need room right away. Unfinished downloads you've given up on and app updates waiting in Caches can go to the Trash in Finder.
Does restarting a Mac delete temporary files?
Apple doesn't document a restart emptying the temporary folders. A restart does close every app, which releases files they held open, and it clears the swap files. The daily three-day cleanup is what removes old temporary items.
Is it safe to delete the tmp folder on a Mac?
No. Never delete the folder itself, and don't remove items inside it while apps or installers are running, because the tool that made them can fail. macOS removes items there that haven't been used for three days, every day.
How often does macOS clear temporary files?
Once a day. A job called tmp_cleaner, added in macOS Sonoma, removes items in /private/tmp that haven't been used for more than three days, and your account's own temporary folder follows a similar three-day rule. macOS also clears temporary database files and interrupted downloads when space runs low.
What is a .download or .crdownload file on a Mac?
It's an unfinished download. Safari keeps one as a package ending in .download, and Chrome uses a name ending in .crdownload, until the file is complete. Resume it from the browser's downloads list, or move it to the Trash if you no longer need it.
Can I recover an unsaved document from temporary files on a Mac?
Rarely. Try the app first: many save automatically, and File, Revert To, Browse All Versions shows earlier versions. Microsoft Office keeps AutoRecover files in each app's container and opens them the next time you open the app after a crash.
Do temporary files slow down a Mac?
No. They only take space, and macOS removes old ones by itself. Apple's checklist for a slow Mac starts with having enough free space on the startup disk, so they matter only when the disk is nearly full.
Sources
- Optimize storage space on your Mac · Apple
- Start up your Mac in safe mode · Apple
- When "/tmp" and $TMPDIR directory are cleaned up in macOS? · Apple Developer Forums
- tmp_cleaner(8) · macOS manual pages
- confstr(3) · macOS manual pages
- Recover files in Office for Mac · Microsoft