ScrubsDownload

Guides › Mac folder guide · updated

What are sleepimage and the swap files on a Mac, and can you delete them?

/private/var/vm/sleepimage
/System/Volumes/VM

By Parsa Nasirimehr

Leave them alone. sleepimage holds your Mac's memory when it sleeps, and the swapfiles extend memory when apps need more than the Mac has. macOS creates, resizes and removes them itself; restarting shrinks swap.

How big it gets

On the Mac we measured, a working developer's Mac on macOS 27: 8.5 GB: a 2.1 GB sleepimage and six 1 GB swap files, measured on 2 November 2026.

What it is

sleepimagemacOS writes memory contents to it so the Mac can resume if power runs out while asleep. It is recreated if removed.
swapfile0, swapfile1…Virtual memory pages macOS moved out of RAM, in /System/Volumes/VM, a volume of their own. They appear under memory pressure and grow in 1 GB steps.
Why it variesSwap grows with memory pressure, such as many browser tabs, virtual machines or large builds, and drops after a restart.
Counted asSystem Data in Storage settings.

How to clear it

  1. Restart the Mac to clear swap.
  2. Quit memory-hungry apps or virtual machines you aren't using, so less is swapped out.
  3. Don't delete the files: they are protected, in use, and come back.

What you lose: There's nothing to clear by hand: macOS removes swap on restart and recreates the sleep image, so deleting them gains nothing.

With Scrubs: Scrubs counts /private/var/vm with the rest of your startup disk, so you see how much swap and sleep take without touching them. Download Scrubs; scanning is free.

Related folders

Sizes measured with du on 2 November 2026. Paths and commands apply to macOS 15 and later. See also how to free up disk space on a Mac.

About the author: Parsa Nasirimehr is a mobile app developer who builds Scrubs, a disk map for the Mac. Spotted something wrong? Write to support@getscrubs.app.