SyntaxHighlighter JS

2013-02-18

Gain Mac disk space by deleting sleepimage

If you have a SSD for your MacBook Pro, you know that disk space is a premium. Deleting the file /var/vm/sleepimage can recover as much disk space as you have physical memory (8GB in my case).

In Terminal, type in the commands below. Since these are admin level commands, you may be prompted for the admin password.

sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepmode

By default, when a newer Mac transition into sleep mode, it stores the memory content onto the file /var/vm/sleepmode. Setting hibernatemode to 0 keeps the sleep memory contents in RAM memory. The  advantage to hibernatemode 0 is that you save disk space and the Mac sleeps and wakes a little faster. The disadvantage is hibernatemode 0 uses a little more power during sleep and if the Mac runs out of power during sleep then all memory content is lost.

No comments:

Post a Comment