hiberfil.sys - deleting and disabling the hibernation file

Today’s computers offer a range of energy-saving options. These features are especially useful for laptops, which often run on battery power instead of being plugged in. One of the most well-known features for saving power and battery is Hibernate mode (also called Suspend to disk), which powers off your computer. Before the operating system shuts down, it stores your current user session to the hard disk so that you can continue exactly where you left off when your computer wakes up from hibernation.

Microsoft systems such as Windows 7, 8, or 10 store this memory content to the hiberfil.sys file, which can use several GBs of space depending on the software, system version and type of device you’re using. Windows creates this system memory file even if you never use Hibernate mode or Sleep mode, which also uses the hibernation method. We’ll explain how to delete the hiberfil.sys file and prevent the automatic creation of a new hiberfil.sys file if you don’t use the hibernation feature in Windows.

$1 Domain Names

Register great TLDs for less than $1 for the first year.

Why wait? Grab your favorite domain name today!

Matching email
SSL certificate
24/7/365 support

What is hiberfil.sys?

hiberfil.sys is a system file in Windows operating systems that contains the current memory contents of the machine state and is used by the “Sleep” and “Hibernate” power-saving options. The file is created and managed by the Windows operating system itself and can be several gigabytes in size (in Windows 10, it usually ranges from three to five gigabytes). The hiberfil.sys file is used to restore the user session when the system boots up after hibernation or sleep mode.

Note

Hybrid sleep is a combination of Sleep and Hibernate mode where only certain system components such as hard drives are shut down.

Windows places the hibernation file in the source directory of the system partition itself, typically in the root directory of C:\. However, hiberfil.sys is a hidden and protected operating system file, so you won’t see it by default. If you want to change this setting, for example to view the size of the file, do the following:

  1. Go to the View tab and select the Hidden items checkbox.
  2. Click Options, and then click Change folder and search options.
  3. In the dialog box that appears, go to the View tab and uncheck Hide protected operating system files (Recommended).

How to delete and disable the hiberfil.sys file

Although hiberfil.sys is a hidden and protected system file, you can safely delete it if you don’t want to use the power-saving options in Windows. That’s because the hibernation file has no effect on the general functions of the operating system. However, you can’t use the standard delete method (right-click and “Delete”) because Windows actively uses this file. When you try to do this, you’ll get a message saying that the hiberfil.sys file is open in another program.

The solution is to disable Hibernate mode. Windows will then automatically delete hiberfil.sys as a result. We’ll now explain exactly how to do this in Windows 7, 8 and 10.

Note

you need administrator privileges to disable hiberfil.sys.

How to the disable hiberfil.sys in Windows 10

There are two ways to disable the hibernation file that stores your session to the hard disk: Either disable the service using Command Prompt or change the registry entry for hiberfil.sys. In both cases, you have to have the necessary access privileges because the hibernation file is a system file, as mentioned above.

Deleting hiberfil.sys via PowerShell in Windows 10:

To turn off caching in the system file via PowerShell, all you need to do is a run a command. But first you need to run PowerShell as an administrator by choosing the keyboard shortcut [Windows] + [X] or right-clicking the Windows icon and choosing Windows PowerShell (Admin) Windows PowerShell:

Once you’ve launched PowerShell (you may need to enter a password), type in the following CMD command to disable the hiberfil.sys file:

powercfg /hibernate off

Press Enter to confirm your entry. Hibernate mode will be disabled and the hiberfil.sys file will be automatically deleted.

Note

You can also use the powercfg command if you want to re-enable Hibernate mode later. All you have to do is change the “off” parameter to “on”

Deleting hiberfil.sys via the registry in Windows 10:

You shouldn’t disable the hiberfil.sys file via the registry unless you have experience using the registry database. Incorrect entries or changes to the entries can easily cause Windows 10 to stop working properly.

Tip

The Windows Registry Editor is the best way to modify the registry. Open it by pressing Windows + R and typing regedit in the Run dialog box. To learn more about the Windows Registry Editor, see our article on regedit.

The service is relatively easy to turn off using this method. First, open the “HibernateEnabled”registry entry, which is located at:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

Double-click the above entry and set the value in the Value data field to 0 to disable Hibernate mode and delete the hiberfil.sys file:

Deleting hiberfil.sys in Windows 7 and 8: Step-by-step guide

You can also remove the hibernation file from your system if you’re using Windows 7 and 8. Just like in Windows 10, you can choose between Command Prompt and the registry database. The procedure is almost the same as in Windows 10.

Deleting hiberfil.sys using Command Prompt in Windows 7 and 8:

Although the command to disable hiberfil.sys is the same in all versions of Windows, the steps for opening Command Prompt are different depending on the version you’re using. Unlike Windows 10, Windows 7 and Windows 8 don’t have a Quick Access Menu, so this option for launching Command Prompt isn’t available. Instead, open the Windows Start menu and use the built-in search feature. Simply type the following in the search bar:

cmd

Windows will show Command Prompt as a best match. Right-click to select it and choose Run as administrator. Enter the CMD command above and choose Enter to disable caching for Hibernate mode and to delete hiberfil.sys:

powercfg /hibernate off

Deleting hiberfil.sys via the registry in Windows 7 and 8:

Just like in Windows 10, you start from the Start menu if you want to disable hiberfil.sys via the registry. But instead of using the search bar, use the Run function. If it’s not visible in your Start menu, you can unhide it as follows:

  1. Right-click the task bar.
  2. Select Properties.
  3. Go to the Start Menu tab and click Customize.
  4. Select Run command and click OK. Chose Apply to save the change.

Open the “Run” dialog and enter the command for launching the Registry Editor:

regedit

Now open the directory for the registry entry of Windows Hibernate mode:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

Then click HibernateEnabled and set the value of this key to 0 to remove the hiberfil.sys file. If the key doesn’t exist, create it manually: Right-click in the window on the right and select “New” and then DWORD value. Enter “HibernateEnabled” as the key name:

We use cookies on our website to provide you with the best possible user experience. By continuing to use our website or services, you agree to their use. More Information.