Tuesday, May 7, 2013

Delete Hibernation File - (hiberfil.sys) - Free some space on Windows 7 / 8

To avoid some of the drawbacks of Vista’s Sleep power-saving mode, you can hibernate your PC. Hibernate saves a copy of everything in your PC’s memory (RAM) onto your hard disk before it shuts down.

Windows uses the file hiberfil.sys, stored in the root folder of your hard disk, to hold your hibernation data. Because it must hold everything in memory, its size is the same as the amount of installed system memory.

Hibernation is made unavailable when you set the value of the Hibernate after setting to Never by using the Power Options item in Control Panel. To turn hibernation off in Windows Vista, follow these steps:
  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate off, and then press ENTER.
  5. Type exit, and then press ENTER.
To turn hibernation in Windows Vista, follow these steps:
  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate on, and then press ENTER.
  5. Type exit, and then press ENTER to close the Command Prompt window.
Have 4 GB of RAM? You’ll see a 4 GB hiberfil.sys file on your hard disk that Windows won’t let you delete. Windows creates the hiberfil.sys file automatically when you turn on the Hibernate feature; the only way to delete the file is to turn off Hibernate.
  Here is a shortcut to turn-off hibernate: open a Command Prompt window in administrator mode and type this command at the prompt:
powercfg /hibernate off

Then press Enter. If the command returns you to the prompt with no message, the change was successful, and hiberfil.sys should be gone. If hiberfil.sys is still there, hibernation may’ve already been turned off, and the file may be left over from an older version of Windows.

Another way to delete the file is to use the Disk Cleanup tool.  You can use this by typing in cleanmgr.exe in the search or run prompt; just select the drive containing the file, place a checkmark next to it then click OK.



Delete Hiberfil.sys File
To delete this file, you have to use the command prompt to manually turn off hibernation. If you turn off hibernation via Power Options (which I will show you next), it will not delete the actual file itself.

Open a command prompt in Windows 7 by typing command in the search box. Right click Command Prompt and choose Run as Administrator.

To turn off or disable hibernation, type the following command at the prompt:
powercfg –h off

This will disable hibernation and will remove the hiberfil.sys file from your system.

Turn Off Hibernation in Windows 7
To disable hibernation in Windows 7, you have to go into Power Options and click on Change plan settings.


Then click on the Change advanced power settings link at the bottom.


Now expand Sleep and then expand Hibernate after. Change the value of On battery and Plugged in to 0 minutes. Note that the option will not even be available if you turned off hibernation using the command line.


That’s pretty much it! Hopefully, you can reclaim some lost disk space by getting rid of the hiberfil.sys file in Windows 7.

No comments:

Post a Comment