What is hiberfil.sys file on Windows and how to remove it in Windows 11, 10, and older versions

When managing storage on a Windows PC, especially on devices with small SSDs and a high amount of RAM, you may come across a large file called hiberfil.sys. This system file can take up several gigabytes of disk space, leaving users wondering about its purpose and whether it’s safe to delete. In this article, we’ll explore what hiberfil.sys is, its role in the operating system, and step-by-step methods to remove when you need to save disk space or manage it in Windows 11, 10, and older versions.

Understanding hiberfil.sys

What is hiberfil.sys file?

hiberfil.sys is a system file created by the Windows operating system to support the hibernation feature. Hibernation is a power-saving state that allows users to save their current session, including all open files and applications, to the hard drive before the system shuts down completely.
Unlike the Sleep mode, which keeps the session in the RAM and requires power, hibernation writes the session data to the hiberfil.sys file on the disk, enabling the system to power off entirely. When the computer is turned back on, it retrieves the session data from hiberfil.sys on your disk drive, resuming exactly where the user left off.

Why is hiberfil.sys so large?

The size of hiberfil.sys is directly proportional to the amount of RAM installed in your system. The file size is about 75% of your total RAM. For example:

  • A system with 16 GB of RAM may have a hiberfil.sys file size of approximately 12 GB.
  • A system with 8 GB of RAM will allocate around 6 GB for this file.

This can become a problem on systems with smaller SSDs, where every gigabyte of storage space is valuable. If you don’t use hibernation, this file becomes unnecessary, and its removal can free up significant disk space.

The purpose and use of hiberfil.sys

While hibernation is the primary function of hiberfil.sys, it also plays a role in Fast Startup, a feature introduced in Windows 8 and continued in Windows 10 and 11. Fast Startup uses hibernation technology to speed up boot times by partially saving system state data to the hiberfil.sys file when the computer shuts down.

Use cases for keeping hiberfil.sys

  • Frequent hibernation: If you regularly use the hibernation feature, hiberfil.sys is essential.
  • Fast startup: This file is required if you rely on faster boot times, especially on older hardware. However, with a higher amount of RAM, it can be slower due to the much bigger hiberfil.sys file size.

When to remove hiberfil.sys

If you never use hibernation or run out of disk space on the small SSD drive, you can safely disable these features and remove the hiberfil.sys file to reclaim disk space.

How to remove hiberfil.sys in Windows 11, 10, and older versions

Removing hiberfil.sys involves disabling the hibernation feature in Windows. 

Step 1: Check the size of hiberfil.sys file

Before deciding to remove it, you can check the size of hiberfil.sys:

  1. Open File Explorer.
  2. Navigate to the root directory of your system drive (usually C:\).
  3. Ensure hidden files are visible:
    Click on the View tab and select Show > Hidden items.
    Alternatively, in older Windows versions, go to Folder Options > Viewenable Show hidden files, folders, and drives, and uncheck Hide protected operating system files (Recommended).
  4. Look for hiberfil.sys in the list of files on C:\ drive.

Show hidden files option in Windows Explorer view options dialog.

Hidden system files on default Windows drive.

Step 2: Disable hibernation via Command Prompt

To remove hiberfil.sys, you must disable hibernation. 

For Windows 11 and 10:

Command Promt - turn off Windows hibernation feature

  1. Open Command Prompt as administrator: Press Win + S, type cmd, and select Run as administrator.
  2. Disable hibernation: Type the following command and press Enter:

    powercfg -h off

  3. Verify removal:
    Navigate back to C:\ and check if the hiberfil.sys file has been deleted.

For older versions (Windows 7 and 8):

The process is the same: Open the command prompt with administrative privileges. Use the command:

powercfg -h off

Confirm that the hiberfil.sys file has been removed.

Step 3: Disable Fast Startup (optional)

If you are using Fast Startup in conjunction with hibernation, disabling hibernation will also disable Fast Startup. However, to manually turn it off:

  1. Open Control Panel.
  2. Navigate to Hardware and Sound > Power Options > Choose what the power buttons do.
  3. Click Change settings that are currently unavailable.
  4. Uncheck Turn on fast startup (recommended) under Shutdown settings.
  5. Click Save changes.

Step 4: Reclaim additional disk space (Optional)

After removing hiberfil.sys, consider optimizing your storage further:

  • Use the built-in Disk Cleanup tool to remove temporary files and system cache.
  • Manually delete unnecessary files or uninstall unused applications.
  • Try using tools like WinDirStat, which allows users to see what files take up the most space on the storage disk.

Re-enabling hibernation

If you decide later to use hibernation or Fast Startup, you can re-enable the feature and restore the hiberfil.sys file:

Open Command Prompt as administrator and enter the following command:

powercfg -h on

Hibernation and the associated hiberfil.sys file will be restored.

Additional tips for managing small SSDs

  • Move user data: Shift large folders like Documents, Downloads, and Pictures, Movies to an external drive or secondary storage.
  • Uninstall bloatware: Remove pre-installed apps and programs you don’t use.
  • Enable Storage Sense: On Windows 10 and 11, turn on Storage Sense to automatically free up space by deleting temporary files.
  • You can compress files and folders.
  • Try using tools like WinDirStat, which allows users to see what files take up the most space on the storage disk. You will often find another large file(s) on your computer that can be deleted to free up space. But be careful if you don't know what the file is. There are also undeleted big software or driver installation files, which, in many cases, are stored with various old versions, etc.

Related software and links:

Microsoft Windows icon

Microsoft Windows    Microsoft Windows platform
A series of operating systems developed by Microsoft

 

Add new comment about “What is hiberfil.sys on Windows and how to remove it

Related file extensions

sys - System file

Go to:
Article related software
Add comments...

Enter any file extension without dot (e.g. pdf)
Search for file extension details and associated application(s)

RSS feed