I was running out of disk space on the C: drive of my laptop recently. I used WinDirStat to look for some files that could be removed to free up space. It was immediately apparent that most of my free space had been taken up by a couple of virtual machine images I had been working on. However, I also noticed a large chunk of space being taken up by the Windows 7 hibernation file (hiberfil.sys).
The hiberfil.sys file is used to dump the contents of RAM when the laptop goes into hibernation, so it has to be almost the same size as the amount of RAM in the laptop (I guess some compression takes place). As we add more and more RAM to our laptops, more and more disk space will be eaten up by hiberfil.sys. For example, a laptop with 8 GB of RAM may have a hibefil.sys file taking up about 6 GB on the hard drive. Since I don’t use hibernation on my laptop (just sleep and shutdown), I searched for a way to get rid of the file without making Windows angry. The answer is pretty simple. You just open a command prompt with administrator privileges and run “powercfg –h off”. Windows hibernation is now disabled. Your hiberfil.sys file will be gone and the “Hibernation” option will be removed from the Start menu (see screenshot below). [more]