# Is it safe to delete /private/var/vm/sleepimage?

Is it safe to delete? · Library and system · Updated 21 November 2026. By Mohit Nippanikar, who makes SiftMac.

## The short answer

- **No, leave it.** It’s where macOS saves a copy of memory so a sleeping Mac can pick up where it was, even if the battery runs out. macOS writes it again the next time the Mac sleeps, so deleting it wins nothing for long.
- **What losing it would cost:** protection for your open work if power fails while the Mac sleeps. The only real way to be rid of it is a power setting, and Apple’s documentation says to use caution with it.
- **Does it come back?** Yes, by itself. On a laptop it’s part of normal sleep.
- SiftMac’s verdict: Leave it

## 1. What it is

When a Mac sleeps, its memory stays powered so it can wake instantly. With *safe sleep*, macOS first writes a copy of memory to the disk, into this file. If power runs out while the Mac is asleep, it restores from that copy instead of losing everything that was open.

A power setting, `hibernatemode`, decides whether a Mac does this. Laptops default to mode 3: memory stays powered and the copy is written as well. Desktops default to mode 0, with no copy, although a desktop that supports *standby* can still write one after it has slept for a while. Mode 25 always powers memory off and restores from the file, which is slower to sleep and wake but easier on the battery.

The file belongs to the system, and only the system can read it. Apple’s `pmset` manual notes that it can only live on the startup volume.

## 2. Where it is

```
/private/var/vm/sleepimage
```

`/private/var/vm` and `/var/vm` are the same folder. Older versions of macOS kept swap files here as well; current ones keep them on a separate volume, so the sleep image is usually the only file you’ll find. [More about swap files](https://siftmac.com/safe-to-delete/swap-files).

## 3. How big it gets

Because it’s a copy of memory, its size depends on your Mac. To see how big it is, and the settings that control it:

```
ls -lh /private/var/vm/
pmset -g | grep -E 'hibernate|standby'
```

A laptop normally shows `hibernatemode 3` and a `hibernatefile` of `/var/vm/sleepimage`.

## 4. Why not to delete it, and what really controls it

Removing the file would take `sudo rm` on a system file, and it gains nothing: macOS writes a new one the next time the Mac sleeps. Don’t.

If you really want no sleep image, it’s the setting that matters, not the file. Apple’s `pmset` manual says hibernation images stop only when `hibernatemode`, `standby` and `autopoweroff` are all 0, and marks the hibernation settings “Please use caution”. On a laptop, that means a battery running flat during sleep takes your open work with it, so SiftMac’s advice is to keep the defaults.

To free space that stays free, look at what you control: [Time Machine’s local snapshots](https://siftmac.com/guides/time-machine-local-snapshots), [old macOS installers](https://siftmac.com/safe-to-delete/macos-installers) and the rest of [System Data](https://siftmac.com/guides/system-data-on-mac).

## 5. What happens afterwards

- If the file is deleted anyway, nothing visible happens until the next sleep, when macOS writes a fresh one.
- With hibernation switched off, the copy isn’t written, and a Mac that loses power while asleep starts from scratch, without its open windows or unsaved work.
- Going back to the default setting restores safe sleep.

## Questions

### Can I delete sleepimage to free space?

Not for long. macOS writes it again the next time a laptop sleeps. The space it takes is what protects your open work if the battery dies during sleep.

### Why is sleepimage so big?

Because it holds a copy of memory. How large it gets depends on the Mac; `ls -lh /private/var/vm/` shows the real figure.

### Do desktop Macs have a sleepimage?

Desktops default to `hibernatemode 0`, which writes no copy, but one that supports standby can still write it after sleeping for a while. `pmset -g` shows your settings.

### Is sleepimage the same as hibernation?

It’s the file hibernation uses. In mode 25 a Mac turns memory off and always restores from it, which saves battery but makes sleeping and waking slower.

## How SiftMac handles it

SiftMac doesn’t list or touch the sleep image. It belongs to macOS’s power management, outside anything the app cleans, and its System Data view sticks to parts you can act on.

Download: https://siftmac.com/SiftMac.dmg (scanning is free, and so is the first 2 GB of cleaning).

## Sources

- [pmset(1) manual page: hibernatemode, hibernatefile and standby](https://keith.github.io/xcode-man-pages/pmset.1.html)

## Related

- [Is it safe to delete swap files (swapfile0, swapfile1…) on a Mac?](https://siftmac.com/safe-to-delete/swap-files)
- [How to clear System Data on a Mac, safely](https://siftmac.com/guides/system-data-on-mac)
- [Is it safe to delete Time Machine local snapshots on a Mac?](https://siftmac.com/guides/time-machine-local-snapshots)
- [What is purgeable space on a Mac?](https://siftmac.com/guides/purgeable-space-on-mac)

Canonical: https://siftmac.com/safe-to-delete/sleepimage
