I know how to turn off hibernation, that's not what I am asking for. I just want to delete and reset size of hibernation size back to zero. When the hibernation is on, the file cannot be deleted. When it is off, the file disappears. How can i delete it without it reappearing with the same size as it had before? I tried cleaning the disks with windows disk cleanup and also tried wiping free space with Ccleaner but after turning on hibernation the file always reappeared with its previous size.
4 Answers
You can change the size of hiberfil.sys using the powercfg utility:
POWERCFG /HIBERNATE /SIZE 100
The size is given as a percentage of your physical memory size. The minimum allowed setting is 40% on Windows 10/11, earlier it supposedly was 50%.
You can read more about these settings in the official documentation.
An earlier question on the topic produced an answer that said the system would BSOD on hibernate if hiberfil.sys is too small. It is unclear if this behavior persists.
Do note that this is no “reset” and hiberfil.sys has never been zero bytes. If you think the file is taking up too much space, I suggest you simply disable hibernation altogether.
- 65,551
If you understand the purpose of hibernation file you will understand why it is so big. As mentioned in comment it is always the size of your RAM because it stores the the content of RAM with the purpose that on next start it will restore those contents and continue the run the computer.
- 49,799
- 7,848
I've dove
powercfg -h off
powercfg -h on
The real size of the new file was the same as the old one (6.6G), but... the allocated size reduced (17G -> 6.6G)