Is it safe to delete /private/var/sleepimage on OS X?

So I have an OS X machine running desperately low on hard drive space. I ran DiskInventory X and found that

/private/var/sleepimage

is taking up 2GB of space. I understand that this file is used to hold the contents of RAM or some such thing, so in the event of sudden battery or power loss, no data will be lost.

If I start the machine up in Target mode, and wipe that file out, is there any bad repercussions outside of risking data loss in the event of a crash?

1 Answer

You can safely delete it without going into Target Disk Mode.

sudo rm /private/var/vm/sleepimage

Note that this will be recreated when you sleep your computer again. To disable safe sleep altogether (something I don't recommend),

sudo pmset -a hibernatemode 0
sudo rm /private/var/vm/sleepimage

Doing this may cause you to lose data if your computer loses power while sleeping.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like