Yesterday, I wrote an article about a great little utility called WinDirStat and its ability to create a bitmap of what files and folders are consuming the most space on your drives. One thing I did discover was a huge 9GB hiberfil.sys file on my C: partition that was serving no real purpose as I do not use hibernation nor hybrid sleep modes (to find out what the difference is between these modes, check out this article).
Obviously, I wanted to get my space back!
The problem is that the hiberfil.sys file is considered a system file and can be difficult to delete by conventional means (i.e. deleting through Windows Explorer or through a command prompt). Fortunately, you can achieve the desired result in Windows Vista and Windows 7 by opening an administrative command prompt by doing the following:
- Click “Start”,
- Type in “cmd”,
- Right click on “cmd” and click on “Run as administrator”,
- Accept any User Account Control prompts that may appear,
- At the command prompt, type in “powercfg -h off” and press Enter,
- Close the command prompt.
This will disable hibernation mode and remove the hiberfil.sys file from your computer.
Of course, hibernation and hybrid sleep modes are around for a reason so under normal circumstances I would recommend that you leave the hibernation settings and files alone. However, if you know what you are doing and have taken the necessary precautions to avoid uncontrolled shutdowns (such as using a UPS) there should be no harm done.