SiftMac
Is it safe to delete? · Library and system · Updated 21 November 2026

Is it safe to delete swap files (swapfile0, swapfile1…) on a Mac?

By Mohit Nippanikar, who makes SiftMac

The short answer
On this page
  1. What it is
  2. Where they are
  3. How big they get
  4. Why not to delete them, and how to make swap shrink
  5. What happens afterwards
  6. Questions

1. What it is

When memory runs short, macOS first compresses what it can’t spare. When that isn’t enough, it writes some of memory to the startup disk and reads it back when needed. Those pieces live in swap files named swapfile0, swapfile1 and so on, and they’re encrypted.

On current macOS they sit on a volume of their own, called VM, which Apple’s security guide describes as unencrypted and used by macOS for storing encrypted swap files. Older versions of macOS kept them in /private/var/vm, which is why many guides still point there; today that folder normally holds only the sleep image.

2. Where they are

/System/Volumes/VM
/private/var/vm   (older versions of macOS)

The VM volume is hidden in Finder. Terminal lists the files and their sizes without a password:

ls -lh /System/Volumes/VM

3. How big they get

sysctl vm.swapusage shows how much swap exists and how much of it is in use right now. Activity Monitor shows the same in its Memory tab as Swap Used, next to the Memory Pressure graph.

sysctl vm.swapusage

Swap grows a whole file at a time, so the total is usually a little more than what’s used.

4. Why not to delete them, and how to make swap shrink

The files belong to the running system, and removing one would pull memory out from under running apps. macOS offers no way to delete them, and you don’t need one:

  1. Open Activity Monitor, click Memory, and sort by the Memory column to see which apps use the most.
  2. Quit what you don’t need: browsers with many tabs, virtual machines, large editors.
  3. Restart if swap stays high. The Mac starts with fresh memory and nothing in swap.
  4. If Memory Pressure is often yellow or red, the Mac could use more memory: Apple says yellow means it might eventually need more RAM, and red that it needs more. System Information shows whether yours can be upgraded; on Macs with Apple silicon it can’t, so it’s a choice for your next Mac.

5. What happens afterwards

Questions

Can I delete swapfile0?

No. It’s in use by the running system. Quit memory-hungry apps or restart, and macOS manages the files itself.

Why does my Mac use swap when Memory Pressure is green?

macOS moves memory that hasn’t been touched for a while out of the way, so active apps get the RAM. Apple describes green pressure as the Mac using its RAM efficiently, so some swap then is normal.

Where are swap files on a Mac?

On current macOS, in /System/Volumes/VM, a hidden volume of their own. Older versions used /private/var/vm.

Can I turn swap off?

There’s no supported switch for it on a Mac. Run less at once, or choose a Mac with more memory next time.

How SiftMac handles it. SiftMac doesn’t list or touch swap files; they’re part of the running system. Its System Data view sticks to what you can act on, such as purgeable space and snapshots (explained and left to macOS), old macOS installers and device backups.

Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works