- Hibernation file: Learn how the large hiberfil.sys controls the sleep mode ("hibernation mode") of Windows 11 / 10 / 7.
- Deleting and reducing: Use all methods with which you can safely delete, reduce, deactivate or reactivate hiberfil.sys, for example with the commands powercfg -h on and off or /h /type reduced.
- Hibernate to boot faster or free up space: Save disk space or increase your boot speed by making simple adjustments to the hibernation file.
Quick overview:
What is Hiberfil.sys - and why is the file so large?
The hiberfil.sys is one of these very large Windows system files. Often several gigabytes in size, they usually become noticeable at some point:
The Windows PC is running slower than usual or the hard disk space is suddenly running out.
Or both.
And then you discover this hidden file in the root directory of Windows (usually drive "C", see picture).
What does hiberfil.sys do and why do we need it?
The hiberfil.sys is the so-called Idle state filewhich is often huge in Windows 10/11/7 and plays a central role in the hibernation mode of your PC.
Their name hiberfil is derived from "hibernate".
In Windows versions such as Windows 11, 10, 8 and 7, it saves the current status of your PC, including all open programs and documents.
It enables your Windows computer to come out of "sleep mode". to start up again more quickly and pick up right where you left off.
Hibernation could not work without this file.
But why is the Size of the hiberfil.sys file sometimes gigantic?
Quite simply, it must be able to hold the entire contents of your working memory.
This means that the more memory your PC uses, the larger the file will be.
But in contrast to the Windows swap file it only saves the memory contents for the quick wake-up from standby "sleep mode".
Delete Hiberfil.sys and deactivate hibernation - is that risky? (Incl. instructions)
Are you wondering whether deleting hiberfil.sys is a good idea? Because the file is very large and you want to speed up your Microsoft operating system or free up disk space?
We show you when it makes sense to remove the hibernation file and how to do it.
Can I delete the hiberfil.sys in Windows 10 / 11?
Yes, you can delete the hiberfil.sys, but there are a few things to keep in mind.
In the various Windows versions, such as Windows 10, 8 and 7, it is responsible for hibernation.
If you do not use this function, you can delete the file to free up storage space - this tip even Microsoft itself.
But beware: standby hibernation mode no longer works without it.
The middle way: Would you prefer to reduce them instead of deleting them? Then skip to the section below...
Instructions for deleting hiberfil.sys - how to deactivate hibernation mode
These 3 steps will show you how to securely delete hiberfil.sys in Windows 11 / 10 / 7 / XP:
- First open the command prompt with administrator rights. This is easy to do via the Start menu: Enter in the search field
cmd
right-click on the result and select "Run as administrator" (or in Windows 11/10 click directly on the entry shown on the right, see image below). - Briefly confirm the opening by clicking on "Yes".
- Then enter the command
powercfg -h off
and press Enter (alternatively the command powercfg.exe /hibernate off).
Voilà, the hiberfil.sys is deleted, your hibernation mode is deactivated and your hard disk space is happy.
You will no longer find the deleted file in Explorer, see screenshot below (only pagefile.sys and swapfile.sys are available).
Here are the picture instructions with the individual steps:
Video guide for deleting and deactivating hibernation mode
Advantages and disadvantages of deactivation
The advantage: If you deactivate hiberfil.sys, you will gain back disk space, as this file can often be several gigabytes in size.
The disadvantage? The standby mode of your Windows PC will no longer be available.
This means that you have to shut down your computer completely instead of quickly putting it into sleep mode and continuing to work seamlessly later.
Starting your PC without the hibernation file will therefore most likely take longer.
Restore deleted hiberfil.sys (activate hibernation mode)
If you want to use hibernation on your PC again, no problem!
We'll show you how to reactivate it so that you can enjoy the benefits of a quick start and seamless continuation of work.
Activating or reactivating sleep mode is just as easy as deactivating it:
- Open the command prompt again as administrator. You do this by entering
cmd
in the Start menu, followed by a right-click on the search result and selecting "Run as administrator". - Then enter the command
powercfg -h on
and confirm with Enter (works identically): powercfg.exe /hibernate on)
This activates the hibernation mode and the hiberfil.sys is needed again and created automatically.
How can I reduce the size of Hiberfil.sys? (2 methods)
Reducing the size of hiberfil.sys is a frequent request from users - to save storage space without having to do without important functions such as hibernation.
The good news: Microsoft has expanded the functions and from Windows 10 you can reduce the hiberfil.sys automatically or user-defined.
We show you how to effectively save hard disk space in Windows 11 and Windows 10 and reduce the size of the hibernation file without completely giving up your standby mode.
1. Automatically reduce the size of hiberfil.sys (Windows determines the size)
In Windows 10, you can automatically reduce the size of hiberfil.sys using the powercfg command.
This is done via a special command in the command prompt:
- Open the command prompt as administrator and enter the command
powercfg /h /type reduced
.
After the entry, a text appears with confirmation of the respective size - in my case:
The size of the idle state file has been set to 1717874688 bytes.
This automatically reduces the size of hiberfil.sys according to system specifications, whereby the functionality of the idle state is largely retained.
But limited:
Reducing the size of the file may make hibernation a little slower, as less data can be saved in advance.
It is a compromise between storage space and speed.
2. customize the size of hiberfil.sys (you specify the size)
Would you like to customize the hiberfil.sys and set it to a size of your choice?
To do this, open the command prompt again with administrator rights and enter the following command:
Powercfg /h /size nn
Replace the Variable nn with a value between the Minimum value 40 and maximum value 100.
Use this command to activate the hibernation mode and set the size of the idle state file as a percentage of the installed memory.
Example: Here I have set my hibernation file to 80 percent:
Tip: Do not select a number that is too small, as otherwise the current memory content can no longer be inserted into the reduced hiberfil.sys.
Can I move the Hiberfil.sys?
Unfortunately it is not so easy to move the hiberfil.sys to another drive.
Windows deliberately stores this file on the system drive, as it is of central importance for hibernation.
An attempt to move them could lead to system instability or even loss of the idle state function.
We therefore advise against moving this file.
If you still want to try to free up space on your system drive, we recommend other methods: deleting unnecessary files or minimizing hiberfil.sys as described in the previous sections.
Differences of the hibernation file in Windows 11 / 10 / 7 / XP and before
Microsoft has optimized the handling of the hibernation file in Windows 10 and 11.
These newer versions offer improved setting options, such as quickly reducing the file size for hibernation via the command prompt.
Windows 11 and 10 are also more efficient in their use of disk space, which means that hiberfil.sys takes up less space on your hard drive.
In older versions of Windows, their management was less flexible.
Windows 8, Windows 7, Windows XP and Vista, for example, did not have the same command line options for optimizing hiberfil.sys as Windows 10 and 11 - shrinking was not yet possible.
And way back in Windows 2000 and ME, hibernation was a newer feature and therefore not managed as efficiently as in later versions.
Summary
- Function: hiberfil.sys is a central system file that is responsible for the hibernation mode of your Windows PC. It saves the contents of your working memory to enable a quick wake-up.
- Delete & deactivate sleep modeYou can deactivate or delete the hibernation file to save memory, especially if you are not using sleep mode. But keep in mind that sleep mode will no longer be available.
- Reduce for disk space optimization: If you want to save disk space without giving up hibernation completely, you can reduce the size of hiberfil.sys in Windows 11 and 10.
FAQ
Source reference
On Windows Tweaks you will find time-saving tech guides for PC, software & Microsoft. For a stress-free digital everyday life. Already we have been "tweaking" Windows since 1998 and just won't stop!
Many thanks for the helpful explanations.
Kind regards
Thanks for your feedback, Leander! Have you changed the Hiberfil.sys or are you using hibernation as usual? Best regards!