Diskzyv0.1
Don't delete by hand

What is the sleepimage file on Mac, and can you delete it?

Short answer

Leave sleepimage alone. macOS uses it to save the contents of memory when your Mac sleeps, and if you delete it the system simply creates it again.

Where it is

/private/var/vm/sleepimage

What it is

When a Mac goes to sleep, macOS can write what is in memory to a file on disk. If the battery runs out or power is lost while it sleeps, the Mac restores your open apps and documents from that file instead of starting fresh. The file is sleepimage.

Its size is set by macOS and is related to how much memory your Mac has and uses. It does not keep growing over time the way a cache does.

The file belongs to the system. It is owned by root, and it sits in the same place as the swap files macOS uses for virtual memory.

How big it gets

Usually a few GB, and it can be as large as your Mac's installed memory.

How to shrink it the right way

  1. There is nothing to clean here. The file is part of how sleep works, and macOS replaces it if it goes missing.
  2. If you are curious how your Mac is set up, run the command below. It only reads the current sleep mode and changes nothing.
  3. If you are short of space, look at the parts of your disk that do grow, such as caches, developer data and old backups.
In Terminal
pmset -g | grep hibernatemode

What happens afterwards

Nothing to expect, since the right action is to leave it. If the file were removed, macOS would write a new one the next time it needed it.

How Diskzy handles it

Diskzy shows the sleep image under System Data, together with swap, marked "Managed by macOS". It does not offer to delete it.

Related guides

See where your Mac's space went

Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.

Try Diskzy for free
Read this in:EnglishEspañolDeutschPortuguêsFrançaisTürkçe日本語