Guide · Windows 11 and 10
hiberfil.sys explained: what it is and how to shrink or delete it
hiberfil.sys is a hidden file at the root of C: that often weighs 6 to 25 GB. It is the hibernation file, and whether you need it depends on how you use your PC.
What is hiberfil.sys?
When a PC hibernates, Windows writes the contents of memory to C:\hiberfil.sys and powers off completely; on the next start it reads it back and you are where you left off. Windows also uses it for Fast Startup, which saves the system session (not your apps) at shutdown to make the next boot quicker.
By default the file is sized at about 40% of your RAM: roughly 6.4 GB with 16 GB of RAM, 12.8 GB with 32 GB, 25.6 GB with 64 GB.
Should you remove it?
- Desktop PC that you shut down or put to sleep: you can usually remove it. Boot times on an SSD barely change without Fast Startup.
- Laptop: keep it. Hibernation protects your work when the battery runs out, and many laptops hibernate after a long sleep.
- Dual-boot PC: turning it off is often recommended, because Fast Startup can leave the Windows drive locked for the other system.
Turn hibernation off (removes the file)
- Right-click Start and open Terminal (Admin).
- Run
powercfg /hibernate off.
hiberfil.sys is deleted immediately and the space is back. Hibernate and Fast Startup are both turned off. To turn them back on, run powercfg /hibernate on.
Or shrink it and keep Fast Startup
Run powercfg /hibernate /type reduced in an administrator terminal. The file shrinks to about 20% of RAM and Fast Startup keeps working, but full hibernation is no longer available. powercfg /hibernate /type full puts it back.
Do not delete hiberfil.sys in Explorer. Windows has it open and recreates it at the next boot. Always use powercfg.
The other big hidden system file is the page file. See how big your page file should be on Windows 11 before you change it.
How Cosmo Cleaner handles it
AutoBeast in Cosmo Cleaner measures the hibernation file, checks whether the PC has a battery, and offers powercfg /hibernate off as a reversible step. Because it changes a system setting, it waits for your tick and never runs unattended; Undo turns hibernation back on.
Questions
Is it safe to delete hiberfil.sys?
Yes, if you remove it with powercfg /hibernate off. You lose hibernation and Fast Startup, nothing else. Deleting the file by hand does not work: Windows recreates it.
Why is hiberfil.sys so big?
It has to hold the contents of memory. By default Windows sizes it at about 40% of installed RAM.
Will turning off hibernation slow down boot?
Slightly on some PCs, because Fast Startup is turned off too. On a modern SSD the difference is usually a few seconds.