How to delete hiberfil.sys and free up disk space in Windows
/ 2 min read
Table of Contents
The hiberfil.sys file is a hidden system file located in the root of your C: drive. Windows uses it to save a complete copy of your RAM contents when the computer enters Hibernation or Hybrid Sleep mode. The size of this file can reach 40–100% of your total installed RAM.
If you are using a modern SSD in a desktop PC and do not rely on the system saving open programs during a complete power loss, you should disable hibernation. Doing so instantly frees up gigabytes of valuable disk space and reduces wear (TBW) on your storage drive.
Note: In Windows 10 and 11, hibernation is also used for the “Fast Startup” feature. Disabling hibernation will also disable Fast Startup. This results in a “clean” OS boot every time, though it may slightly increase boot times on older drives.
Windows Sleep Modes Explained
To understand what you are turning off, here is a brief overview of the different power states:
- Sleep: The computer enters a low-power state, but RAM remains powered. Waking up takes 1-2 seconds. If power is lost, all unsaved data is lost.
- Hibernation: Designed primarily for laptops. The contents of RAM are written to the hard drive (into the
hiberfil.sysfile), and then the computer powers off completely. Data is preserved even without electricity. - Hybrid Sleep: A combination of the two. RAM contents are copied to
hiberfil.sys, but RAM also stays powered. If there is no power loss, the PC wakes instantly from Sleep. If power is lost, it restores from the hibernation file.
How to Disable Hibernation and Delete hiberfil.sys
You cannot delete the hiberfil.sys file using File Explorer (even with Administrator privileges). Windows will block the action because the file is actively used by the system.
The only correct method is to disable the hibernation feature at the kernel level.
Steps
-
Open Command Prompt or PowerShell as an Administrator.
- To do this, right-click the Start menu button (or press
Win + X) and select “Windows Terminal (Admin)” or “Command Prompt (Admin)”.
- To do this, right-click the Start menu button (or press
-
Type the following command and press
Enter:Terminal window powercfg -h off
Expected result: The command executes silently with no text output. The hiberfil.sys file is immediately removed from the C: drive, and all hibernation-related settings are hidden from the Control Panel.
How to Re-enable Hibernation
If you ever need to restore the Fast Startup feature or Hybrid Sleep, open an elevated terminal again and type:
powercfg -h onThe system will instantly recreate the file on your disk.