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:
- Open Terminal.
- Type
sudo rm /private/var/vm/sleepimageand press Enter. - 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...