Sweepfor Mac

Free up storage

Where Mac Stores Temporary Files (and How to Clean Them Up)

Where macOS keeps temp files, which ones you can safely delete, and which ones the system handles automatically.

7 min read

Unlike Windows, macOS doesn’t have a single obvious “Temp” folder. It has several, scattered across the filesystem, each with different rules for what gets cleaned automatically and what sticks around forever. The result is that “temporary” files on a Mac aren’t always temporary — some have been sitting there since you bought the machine.

This guide walks through every place macOS stashes temporary files, what’s safe to delete, and what to leave for the system to handle.

The actual /tmp directory

There is, technically, a /tmp folder on macOS. Open Terminal and type ls /tmp and you’ll see it. It’s a symbolic link to /private/tmp/, where short-lived files from running processes live.

Two important things about /tmp:

  • macOS automatically clears it on every reboot
  • You shouldn’t need to manually delete anything here

If you have an app misbehaving and writing huge files to /tmp, that’s a real problem worth investigating — but the right fix is restarting your Mac, not running rm in /tmp while the offending process is still active.

If you really want to see what’s in there now: ls -lah /private/tmp/. If anything’s larger than a few hundred MB, that’s worth investigating. Usually it’s normal — a video conversion in progress, or an installer working.

/private/var/folders — the real temporary space

This is where macOS keeps most of its actual working temporary files. Caches for system processes, queued up app data, sandbox-related files. The folder structure looks scary:

/private/var/folders/<random>/<random>/T/  ← per-user temp
/private/var/folders/<random>/<random>/C/  ← per-user cache

The good news: macOS manages this folder. The system periodically clears files that are no longer in use. The “temporary” parts get cleared aggressively.

The bad news: macOS doesn’t always do a great job. After a couple of years of use, this can grow to multiple GB.

The right move: don’t touch it manually. If you really need to flush it, restart in Safe Mode (hold Shift during boot on Intel, or hold the power button → Continue holding for Apple Silicon → Safe Mode). Safe Mode forces the system to clear a bunch of caches it normally won’t, including parts of /private/var/folders.

The Caches folders (which are sort of temp)

Apps use ~/Library/Caches/ and /Library/Caches/ as temporary storage that’s supposed to be safe to delete anytime. In practice, most apps treat it that way. Spotify, Slack, Adobe — all dump huge cache files in these folders.

To check what you’ve got:

  1. Finder → Cmd+Shift+G → ~/Library/Caches/
  2. Cmd+J → enable “Calculate all sizes”
  3. Sort by size

Anything in there is theoretically deletable. The bigger folders (Spotify, Slack, Chrome) are the highest-value targets. Quit the app first, then drag the folder contents to Trash.

For system-level caches at /Library/Caches/ — same approach, but you’ll need your admin password.

Skip the manual huntSweep finds every cache, log, and forgotten file in seconds — and only removes what you OK. Download Sweep free →

Application-specific temp files

A lot of apps create their own temp files in their own folders. These often don’t get cleaned up reliably.

Microsoft Word, Excel, PowerPoint create temporary recovery files starting with ~$ or .~. Search Spotlight (Cmd+Space) for ~$ and you’ll often find dozens of these stale files in your Documents folder.

Photoshop uses a “scratch disk” — typically your boot drive — for temp files during heavy editing. If Photoshop crashes, the scratch files stay behind. Look in /private/var/folders and /tmp for files starting with Photoshop Temp.

Final Cut Pro and DaVinci Resolve create render caches that can be tens of gigabytes. They live inside the project library, not in a system temp folder. Each app has a “Delete Render Files” option in its menus.

Logic Pro and GarageBand create bounces and undo files that survive after closing projects.

For the Office files specifically: search Spotlight for ~$ (yes, the literal characters), set scope to “This Mac,” and you’ll get a list. Most are safe to delete — they’re recovery files for documents that are no longer open.

Sleep image and swap (mostly leave alone)

When your Mac sleeps, it writes the contents of RAM to disk in case the battery dies. That’s sleepimage in /private/var/vm/, and it’s the same size as your installed RAM — 16GB on a 16GB Mac.

When macOS runs out of RAM, it uses swap files in the same folder.

Both are managed by the system. You can technically delete them, but macOS will recreate them on the next sleep or memory pressure event. The only real way to reduce these is to install more RAM, or quit apps that are eating memory.

If /private/var/vm/ is unusually huge (tens of GB), restart your Mac. It’ll typically shrink back to a reasonable size after.

Download artifacts

Your ~/Downloads folder isn’t technically a temp folder, but it functions as one for most people. DMG installers used once, ZIP archives that should’ve been auto-deleted after extraction, screenshots dragged to Slack and never cleaned up.

Worth a quarterly purge:

  1. Open ~/Downloads/
  2. Sort by Date Last Opened (View → as List → click that column header)
  3. Anything you haven’t opened in 3+ months is almost certainly disposable
  4. Drag to Trash, empty Trash

A faster bulk approach: Cmd+A to select everything, then Cmd+Delete to send the lot to Trash. Pull back anything you actually need from Trash before emptying.

Tip: Set Downloads to auto-delete old items: Finder → Preferences → Advanced → "Remove items from the Trash after 30 days" handles it for the Trash. For Downloads itself, there's no built-in auto-delete, but Sweep can flag old downloads on every scan.

Browser temp files

Browsers create temp files in two places: their cache folder (handled by the browser’s own clear-data tool), and your ~/Downloads folder (for in-progress downloads).

If you’ve ever cancelled a download partway, you might have orphaned .crdownload (Chrome), .partial (Safari/Edge), or .part (Firefox) files in Downloads. These are partial files that won’t resume. Safe to delete.

Search in Finder: Cmd+F → Where: Downloads → Kind is Other → type “crdownload” or “partial” or “part.”

Mail’s Downloads cache

Apple Mail caches every attachment you’ve ever previewed, in ~/Library/Mail/V10/MailData/. It feels like a temp folder — you didn’t ask for these to stick around — but it’s not. macOS doesn’t clean it automatically.

For a quick reduction: Mail → Settings → Accounts → your account → Account Information tab → “Download Attachments” → set to “Recent” or “None.” This won’t delete what’s already there, but it stops new attachments from being saved locally.

To delete the existing cache: open Mail → Mailbox menu → Rebuild on each mailbox. Or, more aggressively, quit Mail and delete ~/Library/Mail/V10/MailData/ — Mail re-syncs from the server on next launch (slow, but cleanest).

There’s a faster way to reclaim that spaceSweep handles this automatically and lets you approve before anything’s deleted. Try Sweep free →

Crash reports and diagnostic files

When apps crash, macOS writes a crash report. Useful for debugging. Almost never useful for end users. Locations:

  • ~/Library/Logs/DiagnosticReports/ — your user-level reports
  • /Library/Logs/DiagnosticReports/ — system-level reports

These rarely get huge individually, but cumulatively across years, they add up. Delete contents safely — they’re just text files describing past crashes.

Also: ~/Library/Logs/ (regular log files). Same story.

What to do if a temp folder is genuinely huge

Sometimes you’ll see a temp folder in the multi-GB range and it’s not obvious why. Steps:

  1. Use Activity Monitor to find any process actively writing a lot of data. Look at the Disk tab, sort by “Bytes Written.”
  2. If you can identify the process, quit it, then check if the file count drops.
  3. If you can’t, restart. macOS clears most temp areas on reboot.
  4. After restart, recheck the folder. If it’s still huge, you’ve got an app misbehaving — uninstall and reinstall, or check the app’s preferences for cache settings.

Common culprits: video editors mid-export, virtual machines mid-snapshot, Time Machine in the middle of a backup, Spotlight reindexing.

A reasonable temp file routine

The best maintenance is the kind you’ll actually do. Roughly:

  • Restart your Mac weekly. This clears /tmp, /private/var/folders working files, and forces macOS to drop unused caches. Takes 30 seconds.
  • Empty Downloads quarterly. Set a reminder. Old downloads are the easiest space to reclaim.
  • Quit and clear cache folders annually. Or whenever a specific app starts misbehaving.
  • Don’t manually mess with /private/var/folders. macOS handles it. Don’t break it.

Most “temporary” files on a Mac aren’t really temporary anymore — they’re cached because deleting them costs you nothing during normal use. The trick is realizing which ones are actually safe to clean and which are pretending to be temp files but are really persistent app data. The folders above cover most of it.

← Back to all guides