Hiberfil.sys is a hidden system file that Windows 10 uses to store the contents of your RAM when your PC enters hibernation or fast startup. It’s a real file, not a virus, and it can consume several gigabytes of drive space. This article explains exactly what hiberfil.sys does, why it’s so large, and the safe, built-in ways to delete it or shrink it—without breaking your system.
What Is Hiberfil.sys?
Hiberfil.sys is a system file created by Windows at the root of your system drive (usually C:\hiberfil.sys). It’s a container that holds a compressed snapshot of your RAM when your computer enters hibernation. When you hibernate, Windows writes the entire contents of memory to this file, then powers off completely. When you turn the PC back on, it reads that snapshot back into RAM, restoring your open programs and documents exactly as you left them.
Windows 10 also uses hiberfil.sys for Fast Startup (also called Hybrid Boot). When you shut down normally, Windows logs off your user session but hibernates the kernel session—writing a smaller snapshot to hiberfil.sys. On the next boot, it loads that kernel snapshot, which makes startup feel faster than a cold boot.
The file is hidden and protected by the operating system. You won’t see it in File Explorer even with “Show hidden files” enabled, because it’s also marked as a system file. It’s not malware, and you should never try to delete it manually with File Explorer or a deletion command—Windows will refuse or recreate it.
Why Is Hiberfil.sys So Large?
The size of hiberfil.sys is tied directly to the amount of RAM in your computer. By default, Windows sizes it to about 40% of your total physical memory. So on a PC with 16 GB of RAM, the file will be roughly 6.4 GB. On a 32 GB system, it can be around 12.8 GB.
That percentage isn’t fixed. Windows adjusts the file size based on how much memory is actually used during hibernation, and it can grow up to 100% of your RAM if needed. The file is also compressed, so the actual size on disk is usually less than the full RAM amount, but it’s still one of the largest files on your drive.
If you’re running low on disk space, hiberfil.sys is often a prime suspect. Deleting it can free up several gigabytes, but you need to understand the trade-offs.
How to Delete Hiberfil.sys in Windows 10
You can’t simply right-click and delete hiberfil.sys. The only supported way to remove it is to disable hibernation and Fast Startup. Here’s how:
- Open a Command Prompt or PowerShell window as Administrator. Right-click the Start button and choose “Windows PowerShell (Admin)” or “Command Prompt (Admin)”.
- Type the following command and press Enter:
powercfg /h off - Close the window and restart your PC.
After the restart, Windows will automatically delete hiberfil.sys. You can verify it’s gone by checking the drive’s free space or running dir C:\hiberfil.sys /a in an admin command prompt—it should report “File Not Found”.
If you want to keep hibernation but shrink the file, you can set it to a smaller size. The command powercfg /h /type reduced sets the file to about 40% of RAM (which is often the default anyway). To restore full hibernation capability, use powercfg /h /type full.
What Happens When You Delete It?
Deleting hiberfil.sys by turning off hibernation has two immediate effects:
- Hibernation is disabled. The Hibernate option disappears from the Power menu, and you can no longer use the hibernate power state.
- Fast Startup is disabled. Your PC will do a full cold boot every time you shut down, which may take noticeably longer than before.
If you never use hibernation and don’t care about Fast Startup, deleting the file is a safe way to reclaim space. If you rely on hibernation to save your work and battery, you should keep it—or at least use the reduced size option.
One common misconception: deleting hiberfil.sys does not affect your normal sleep mode. Sleep keeps your PC in a low-power state with RAM still powered, and it doesn’t use hiberfil.sys at all.
Alternatives to Deleting Hiberfil.sys
If you want to keep hibernation but need more free space, consider these options:
- Use the reduced hibernation file. Run
powercfg /h /type reduced. This shrinks the file, but hibernation may fail if you have too many programs open. - Move the file to another drive. Not officially supported, but you can set the hibernation file path with
powercfg /h /file D:\hiberfil.sys. This only works if the target drive is NTFS and the system can read it during boot. - Clean up other space hogs. Run Disk Cleanup, remove temporary files, or uninstall large apps—these often free more space than deleting hiberfil.sys.
If you’re comfortable with the command line, you can also compress the file using compact /u C:\hiberfil.sys (to uncompress) or compact /c C:\hiberfil.sys (to compress), but Windows already compresses it by default.
Common Problems and Troubleshooting
Sometimes the command powercfg /h off doesn’t seem to work, or the file reappears. Here are a few things to check:
- Run as Administrator. The command will fail with “Access denied” if you’re not in an elevated prompt.
- Fast Startup is still on. Even with hibernation off, Fast Startup might be enabled separately. Go to Control Panel > Power Options > Choose what the power buttons do, and uncheck “Turn on fast startup”.
- Windows re-enables hibernation. Some system updates or power settings can turn it back on. If the file reappears, repeat the command.
- File is still visible. If you see hiberfil.sys after disabling, it might be a leftover from a previous session. Run
powercfg /h onthenpowercfg /h offagain to force a clean removal.
If you’re unsure whether hibernation is still on, check the Power menu: if “Hibernate” is listed, it’s enabled. You can also run powercfg /a to see all available sleep states.
Frequently Asked Questions
Is hiberfil.sys a virus?
No. It’s a legitimate Windows system file. However, malware can sometimes disguise itself with similar names. If you’re concerned, right-click the file (if visible) and check its properties—it should be signed by Microsoft. You can also run a full antivirus scan to be safe.
Can I just delete hiberfil.sys with a file deletion command?
No. Windows protects the file, and even if you force-delete it, the system will recreate it on the next boot. The only reliable way to remove it is to disable hibernation with powercfg /h off.
Will deleting hiberfil.sys speed up my PC?
It won’t make your PC faster in terms of processing, but it can free up disk space. If your drive was nearly full, that alone can improve overall system responsiveness and prevent errors.
How do I re-enable hibernation after deleting it?
Open an admin command prompt and run powercfg /h on. This recreates hiberfil.sys and re-enables both hibernation and Fast Startup.
Does hiberfil.sys affect SSD lifespan?
Every write to an SSD wears it out slightly, and hibernation writes a large file each time. If you hibernate frequently, it does add to write cycles. However, modern SSDs have a long lifespan, and for most users this is not a practical concern. Deleting the file won’t reverse any wear already done.
Can I move hiberfil.sys to another drive to save space?
Yes, you can use powercfg /h /file D:\hiberfil.sys to relocate it, but the target drive must be NTFS and the system must be able to access it during boot. This is not officially supported and may cause issues with BitLocker or other encryption.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Factory Reset iPad If You Forgot Password
- Ubuntu in Windows Store: Which Editions Work?
- Secure Guest Account on Windows 11: Step-by-Step
- Stop Outlook From Changing Hyperlink Font
- How to Make a Mask on Snapchat: Step-by-Step
- Desktop.ini Windows: What It Is & How to Use It