If your Windows 11 C: drive keeps filling up for no obvious reason, one of the usual culprits is a hidden file called hiberfil.sys. Windows creates it automatically and sizes it against your installed RAM. On a machine with plenty of memory, that single file can run to several gigabytes. It sits there whether or not you ever press Hibernate.

The good news is that you do not have to accept the default. Microsoft’s own powercfg tool can shrink the file, delete it, or put it back. Here is how to do each safely, and how to decide which one you actually want.
What hiberfil.sys is for
Hibernation writes the contents of your RAM to disk and then powers the machine off completely. When you switch it back on, Windows reads that file and restores everything exactly as you left it. The file it writes to is hiberfil.sys, and Windows reserves the space in advance.
There is a second, less obvious user of the same file. Fast Startup — the feature that makes a “shut down” boot quicker — saves the Windows kernel session into the same hiberfile. That is why the file exists on machines whose owners have never touched the Hibernate option. Turn hibernation off and Fast Startup goes with it.
Check how big your hiberfile is
Do this first, because the size depends on your hardware. You need an administrator command line.
- Press
Windows + Xand choose Terminal (Admin). If you do not see it, type cmd in Start, then right-click Command Prompt and choose Run as administrator. - Run
powercfg /a. This reports which sleep states your system supports, including whether hibernation is currently available. - Run
dir /a C:\hiberfil.systo see the file’s actual size in bytes. The/aswitch matters — the file is hidden, so a plain directory listing will not show it.
Whatever number comes back is what you stand to reclaim, in whole or in part.
Option 1: shrink it and keep Fast Startup
This is the safer choice for most people. Windows supports a “reduced” hiberfile that is smaller than the full one. Microsoft’s documentation is blunt about the tradeoff: “A reduced hiberfile only supports hiberboot.” In plain terms, Fast Startup keeps working, but full hibernation does not. Hibernate will disappear from your power menu on this route as well.
Microsoft documents this as a two-step sequence, and both steps matter. Run them in an admin command line:
powercfg /hibernate /size 0— this hands the default size back to Windows to manage.powercfg /hibernate /type reduced— this switches the file to the reduced type.
Run dir /a C:\hiberfil.sys again afterwards to confirm the new size. Note that /size also turns hibernation on if it was off, so run the two commands in that order.
Option 2: turn hibernation off and reclaim all of it
If you never hibernate and you do not care about Fast Startup, you can delete the file entirely. One command does it:
powercfg /hibernate off
Windows removes hiberfil.sys and the space comes back immediately. Do not try to delete the file manually in File Explorer — it is a protected system file and Windows will simply recreate it.
Before you do this, be clear about what you give up. Hibernate disappears from the power menu. Fast Startup stops working, so cold boots will take longer. And on a laptop, a battery that runs completely flat will no longer fall back to hibernation, which means unsaved work is gone.
How to undo either change
Both changes are reversible from the same admin command line.
- To re-enable hibernation:
powercfg /hibernate on. Windows recreates the file. - To go back to a full hiberfile:
powercfg /hibernate /type full. Full hibernation and Fast Startup both work again, and the file returns to its larger size.
Who should leave this alone
If you regularly hibernate a laptop instead of shutting it down, keep the full hiberfile. The space it costs is the price of the feature. The same goes for anyone whose machine is often carried around at low battery.
It is worth naming what the default actually does, though. Windows sizes this file against installed RAM, and Fast Startup is on out of the box on most machines that support it. So the users who paid for the most memory end up reserving the largest chunk of disk for a feature many of them never deliberately use. You also have to know the file exists before you can go looking for it. That is exactly why it keeps turning up as mystery disk usage. If you are chasing vanishing free space more generally, our guide to a hidden Windows 11 log file bug covers another common cause.
One last caveat: the commands above are the documented ones, but they change how your PC starts up. If you manage a work machine under IT policy, check before running them.
Source: Microsoft powercfg documentation
