Disable Hibernation on Windows 8.1 to Remove hiberfil.sys for More Disk Space
This article provides a tutorial on removing the Windows hibernation file to free up disk space when a small solid state disk (SSD) is used as the system drive. Please ensure you have a backup of any data and files you need to keep before changing system configurations. This article is for information only. System configurations can vary widely, therefore any changes made are at your own risk. If you’re confident with computers and understand the meaning of the hiberfil.sys file you can skip to the end of the article for the relevant command, which is to run powercfg -h off at the administrator’s command prompt, otherwise read on for a better understanding.
Apart from low end systems a SSD drive is standard fitting to most computers and laptops. An SSD is also a common upgrade to older systems. A SSD is more expensive than a hard disk drive, as a result small capacity SSDs (less than 128 GB) may be used to keep costs down. Windows 8.1 requires 20GB for installation, modern computing demands soon eats into the the remaining space. A system can be configured to use a small SSD for the Windows system and a large multi-terabyte hard drive for data storage (see Move My Documents and Other Personal Folders). Despite this, or if a second drive is not an option, the SSD may fill up quickly with normal use. Once the SSD is full the computer or laptop will not function properly, may not boot up, or show error messages at boot time. The worst case scenario is data corruption and loss, or even disk failure, when applications cannot handle running with no disk space available.
Shut Down, Sleeping and Hibernating
The power status of a Windows computer can be in one of several states, depending upon the computer type (e.g. laptop or desktop) and the configured Power Options:
- Powered on ready for use
- Shut down (powered off)
- Hybrid Sleep
The C:\hiberfil.sys Windows 8.1 File
Since hiberfil.sys is as large as the system memory turning off hibernation can free up a lot of disk space. The following picture shows how much space a hiberfil.sys is taking up on a Windows machine with 16GB of memory and a 60GB SSD system disk. The utility used is WinDirStat. Hiberfile.sys is the biggest file by far!
To delete the hyperfil.sys Windows system file hibernation must be disabled. Disabling hibernation has some considerations. The Power Options must be configured so that the machine is always left in a safe state when not being used. The safest state is to always Shut Down the machine.
Access the Power Options from Control Panel. This can be done in several ways. Note that you will need administrator access to be able to do this. The quickest way is to type Power at the Start screen and select Power Options from the Search list.
Alternatively bring up the context menu (usually right click) on the Windows flag on the Task Bar, or select the Settings icon on the charms bar. Select Control Panel, choose System and Security and select Power Options.
In Power Options for the selected plan select Change plan settings. Then select Change advanced plan settings. Under Sleep if HIbernate is available ensure it is set to Never (there may be more than one Hibernate option, e.g. for laptops). If the option contains a value, e.g. 60 minutes, deleting the value sets it to Never. Also ensure none of the options under Power buttons and lid are set to Hibernate.
Use powercfg.exe to Delete hiberfil.sys
Open up a command prompt with administrator privileges. To do this type command at the Start screen. Bring up the context menu on Command Prompt (usually right click), then select Run as administrator.
Use dir c:\ /ah to list hiberfile.sys in the root directory.
In the command window type the command to delete hiberfil.sys:
powercfg.exe -h off
The WinDirStat program visually shows the difference from the previous image:
After making the necessary changes check that the normal Sleep and Shut Down options are working as expected. Tweak Power Options if required.
If hibernation is required in the future reverse the instructions above (using powercfg.exe -h on).