Rain WikiWindows · Linux · Android

hiberfil.sys (hibernation file)

System fileWindows 10, 11Safe to delete: Only with its own tool

hiberfil.sys is a hidden system file in the root of the Windows drive (C:\hiberfil.sys). Windows writes the contents of memory into it when the PC hibernates, and Fast Startup uses it to save the Windows kernel at shutdown. Its size is a share of the installed RAM, so on PCs with a lot of memory it can take many gigabytes.

1What uses it

Hibernate saves the whole session to disk and turns the PC off; the session is restored from hiberfil.sys at the next start.

Fast Startup, which is on by default on many PCs, saves only the kernel session at shutdown, which makes the next start faster. It also needs the hibernation file.

2Size

powercfg /h /type reduced keeps a smaller file that is enough for Fast Startup but not for Hibernate. /type full restores the full size. /size sets the size as a percentage of memory.

3Turning hibernation off

powercfg /hibernate off deletes hiberfil.sys and turns off Hibernate and Fast Startup. powercfg /hibernate on creates the file again. The file must not be deleted by hand.

How to shrink or remove hiberfil.sys

  1. Open Command Prompt as administrator.
  2. To keep Fast Startup with a smaller file, run: powercfg /h /type reduced
  3. To remove the file completely, run: powercfg /hibernate off
  4. To turn it back on later, run: powercfg /hibernate on

Cautions

  • Without the hibernation file there is no Hibernate and no Fast Startup.
  • On laptops, hibernation can protect the session when the battery runs out; think twice before turning it off.
  • Never delete hiberfil.sys in File Explorer; use powercfg.

Sources

  1. Disable and re-enable hibernation (Microsoft Learn) learn.microsoft.com
  2. Powercfg command-line options (Microsoft Learn) learn.microsoft.com

Last reviewed: