MainspringGuides › Swap files
macOS Guide

macOS Swap Files Taking Up Space? What's Normal

Updated July 2026 · 3 min read

Look inside /private/var/vm and alongside sleepimage you may find swapfile0, swapfile1, and more — sometimes several gigabytes of them. These are macOS's overflow space for when apps need more memory than you have RAM. Some swap is completely normal; a lot of it is a message.

What swap files are

macOS uses virtual memory: when physical RAM fills up, the system compresses inactive memory first, and if that isn't enough, it moves the least-used pages out to disk. Those pages land in numbered files at /private/var/vm/swapfile0, swapfile1, and so on. The files are created on demand, grow as needed, and are cleared when you restart.

Never delete swap files by hand. The system may be actively using them, and yanking memory pages out from under running apps is a good way to crash them. Unlike caches, this isn't cleanup — it's live system state. Swap is also not the same thing as the sleepimage file that sits in the same folder: sleepimage is a one-off copy of RAM written for safe sleep, while swapfiles are working memory that spilled to disk because RAM ran out.

Check how much swap you're using

  1. Open Activity Monitor from Applications → Utilities.
  2. Click the Memory tab.
  3. At the bottom, read Swap Used and watch the Memory Pressure graph — green means the system is comfortable, yellow means it's compressing hard, red means it's struggling.

The same numbers are available in Terminal:

# current swap usage (used / free / total)
sysctl vm.swapusage

# list the swap files themselves
ls -lh /private/var/vm

How much swap is normal

Zero to a couple of gigabytes is unremarkable, especially on an 8 GB Mac with a browser full of tabs. macOS swaps proactively, so a non-zero number doesn't mean anything is wrong — the memory pressure graph matters far more than the raw figure. Green pressure with 3 GB of swap is fine; yellow or red pressure with 20 GB of swap means your workload genuinely doesn't fit in RAM.

Swap also doesn't accumulate forever: a restart clears every swapfile and starts fresh. If the number climbs back within hours, that's your normal working set, not a leak. And because swapfiles live inside System Data in the storage view, heavy swapping is one of the quieter reasons that category balloons — the space comes back on its own once memory pressure eases or you reboot, which is why chasing it with cleanup tools is wasted effort.

One more distinction that trips people up: "Memory Used" being close to your total RAM is not a problem. macOS deliberately keeps RAM full of cached files because empty memory is wasted memory. Pressure and swap tell you whether the system is struggling; the used figure alone tells you almost nothing.

Shrinking heavy swap use

While you're under the hood

Swap is macOS doing its job — no toggle needed. But while you're tuning your Mac, Mainspring turns 90+ hidden macOS settings into labelled, reversible toggles, no Terminal required.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Watch pressure, not the number

Swap size makes for alarming screenshots, but the memory pressure graph is the honest signal. If you want to understand what green, yellow, and red actually measure, read our guide to memory pressure on Mac.