What hiberfil.sys is and why you might want to remove it

Hiberfil.sys is a hidden system file that Windows creates to store a copy of your computer's memory when it enters hibernation mode. When you hibernate, Windows writes everything in RAM to this file so it can restore your exact session when you power back on. The file is typically as large as your total RAM — so if you have 16 GB of memory, hiberfil.sys takes up roughly 16 GB of disk space.

You might want to delete it if you never use hibernation and want to free up that space. Hibernation is different from sleep mode: sleep keeps your computer in a low-power state with RAM still powered, while hibernation powers down completely and relies on the hiberfil.sys file to resume. Many laptop users disable hibernation because they prefer sleep mode or because they shut down their machines entirely.

Deleting hiberfil.sys is safe only if you first disable hibernation in Windows. If you delete the file while hibernation is still enabled, Windows will simply recreate it the next time you try to hibernate, and you'll get an error message instead.

Key Takeaways

  • Hiberfil.sys is a hidden file that stores your computer's memory during hibernation and typically takes up space equal to your total RAM.
  • You must disable hibernation through Windows settings before attempting to delete the file, or Windows will recreate it automatically.
  • Disabling hibernation is done through the Control Panel power settings or by running a single command in Command Prompt as administrator.
  • After hibernation is disabled, you can delete hiberfil.sys through Disk Cleanup or by manually removing it from the root C: drive.
  • If you change your mind later, you can re-enable hibernation and Windows will recreate the file on its own.

How to disable hibernation on Windows

The safest and most straightforward way to disable hibernation is through the Command Prompt. Open Command Prompt as administrator by right-clicking the Start menu, selecting "Windows Terminal (Admin)" or "Command Prompt (Admin)", and then type the following command exactly:

powercfg /h off

Press Enter. You should see no error message — if the command succeeds, the prompt simply returns to the next line. This single command disables hibernation and removes the hibernation file in one step. You can verify it worked by checking your C: drive in File Explorer; hiberfil.sys should no longer be visible (and if it is, it will be much smaller or gone after a restart).

If you prefer not to use Command Prompt, you can disable hibernation through the Control Panel instead. Open Control Panel, go to Power Options, click "Change plan settings" next to your current power plan, then click "Change advanced power settings". In the window that opens, expand "Sleep", then expand "Hibernate after", and set the value to "Never". Click Apply and OK. This method takes longer but achieves the same result.

Using Disk Cleanup to remove the file

After hibernation is disabled, you can use Windows' built-in Disk Cleanup tool to safely remove hiberfil.sys. Open File Explorer, right-click your C: drive (or whichever drive contains Windows), and select "Properties". Click the "Disk Cleanup" button.

Disk Cleanup will scan your drive and present a list of file categories you can delete. Look for "Hibernation file" in the list — if hibernation is already disabled, this option should appear. Check the box next to it, then click "Clean up system files" at the bottom. Windows will ask for confirmation; click "Delete Files" to proceed.

Disk Cleanup is the recommended method because it only removes files Windows has marked as safe to delete. It will not touch hiberfil.sys if hibernation is still enabled, which prevents accidental data loss.

Manually deleting hiberfil.sys from the root drive

If Disk Cleanup does not show the hibernation file option, or if you prefer to delete it directly, you can remove it manually. First, make sure hibernation is disabled using the command above. Then open File Explorer and navigate to the root of your C: drive (or whichever drive Windows is installed on).

Hiberfil.sys is a hidden file, so you need to show hidden files first. In File Explorer, click the "View" tab at the top, then check the box for "Hidden items". Now you should see hiberfil.sys listed in the root directory. Right-click it and select "Delete". The file will move to your Recycle Bin.

If you get a message saying the file is in use or you do not have permission to delete it, hibernation is still enabled or Windows is still running. Restart your computer and try again, or use the Command Prompt method to disable hibernation first.

How much space you will actually recover

The amount of space freed depends on your computer's RAM. A machine with 8 GB of RAM will free up approximately 8 GB; one with 16 GB will free up roughly 16 GB. Check how much RAM your computer has by right-clicking "This PC" or "My Computer" in File Explorer and selecting "Properties", or by opening Settings, going to System, and looking at "Installed RAM".

Keep in mind that hiberfil.sys does not take up usable space while your computer is running — it is a reserved file that Windows manages separately. Deleting it only matters if your drive is nearly full and you need every gigabyte available. If you have plenty of free space, leaving hibernation enabled costs you nothing in practical terms.

Re-enabling hibernation if you change your mind

If you decide later that you want hibernation back, you can re-enable it just as easily. Open Command Prompt as administrator and type:

powercfg /h on

Press Enter. Windows will recreate hiberfil.sys automatically, and hibernation will be available the next time you shut down your computer. You do not need to restart or take any additional steps — the file will be there when you need it.

Frequently Asked Questions

Will deleting hiberfil.sys slow down my computer?

No. Hiberfil.sys only affects hibernation; it has no impact on normal performance or startup speed. Deleting it will not make your computer faster, but it will not make it slower either. The only change you will notice is that you can no longer use hibernation mode.

What is the difference between hibernation and sleep mode?

Sleep mode keeps your computer in a low-power state with RAM still powered, so it wakes up instantly. Hibernation powers down completely and uses hiberfil.sys to resume, which takes longer but uses almost no power. Most modern users prefer sleep mode because it is faster and uses very little battery.

Can I delete hiberfil.sys without disabling hibernation first?

You can try, but Windows will either prevent the deletion or recreate the file automatically. It is much simpler to disable hibernation first using the Command Prompt command, which removes the file cleanly in one step.

Is hiberfil.sys a virus or malware?

No. Hiberfil.sys is a legitimate Windows system file created and managed by the operating system itself. It is always located in the root of your C: drive and is safe to delete once hibernation is disabled.

Do I need to empty my Recycle Bin after deleting hiberfil.sys?

Not immediately. The file will stay in your Recycle Bin until you empty it, and you can recover it if needed. You only need to empty the Recycle Bin if you want to permanently free up the space and ensure the file cannot be recovered.