Use Caution

Is It Safe to Delete sleepimage?

Quick Answer: The sleepimage file allows your Mac to safely hibernate without losing data if the battery dies. Deleting it is safe, but it will immediately come back.

What is sleepimage?

Located deep inside your Mac at /private/var/vm/sleepimage, this is a massive hidden system file that matches the exact size of your Mac’s physical RAM (for example, if you have 16GB of memory, the sleepimage file will be exactly 16GB).

Why Does It Exist?

When you close the lid of your MacBook, it enters “Sleep” mode, keeping your current session alive in the RAM. However, if your battery completely dies while it’s sleeping, the RAM loses power and your unsaved work would vanish.

To prevent this, macOS writes a perfect snapshot of your RAM to the hard drive inside the sleepimage file (a feature known as Safe Sleep). If the battery dies, the Mac simply loads the sleepimage file back into the RAM when you plug it in, and you resume exactly where you left off.

Can You Delete It?

Yes, but there’s a catch.

Deleting the sleepimage file will not damage your Mac, and it will instantly free up a massive amount of storage space. However, macOS will simply recreate the file the very next time your Mac goes to sleep.

How to Delete It

Because it is a protected system file, you cannot simply drag it to the Trash. You must use the Terminal:

  1. Open Terminal.
  2. Type sudo rm /private/var/vm/sleepimage and press Enter.
  3. Enter your administrator password.

Note: Power users historically used the pmset command to completely disable Safe Sleep (hibernation) to prevent the file from coming back, but this is highly discouraged on modern Apple Silicon Macs.

What Happens If You Delete It?

You will temporarily reclaim gigabytes of storage space. However, if your Mac’s battery dies while asleep before the file is recreated, you will lose any unsaved work (like open Word documents or browser tabs).

Bottom Line

Deleting sleepimage is a safe, temporary band-aid if you desperately need 16GB of storage space to download a file or render a video right now, but macOS will automatically recreate the file later that day.

Discussion

Loading authentication...

Related in macos

macOS Background Download Session Cache (com.apple.nsurlsessiond)

nsurlsessiond caches incomplete background file downloads for system apps and iCloud daemon sync. Clearing the cache is safe.

Safe to Delete

macOS Font Server Cache (/var/db/ats)

Apple Type Services (ats) caches font rendering metrics. Resetting the font cache fixes corrupted font glyphs and system text glitches.

Safe to Delete

macOS System Font Cache Directory (com.apple.fontd)

macOS caches system and user font rendering structures in com.apple.fontd. Learn how to reset macOS font cache to fix garbled text.

Safe to Delete
Back to all files