Windows Tweaks Logo Microsoft PC-Hilfe - 02 blue red
Windows Tweaks Logo Microsoft PC Help - 09 white 120

hiberfil.sys: Delete the large file or use it to optimize the hibernation mode in Windows (2025)

Updated: April 15, 2025
Published: December 6, 2023
  • 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?

What does hiberfil.sys do and why do we need it?

However, unlike the Windows swap file, it only saves the memory contents for waking up quickly from the standby "sleep" state.

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 don't use this function, you can delete the file and free up storage space - this tip is even given by 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:

  1. First open the command prompt with administrator rights. This is easy to do via the start menu: Enter cmd in the search field, right-click on the result and select "Run as administrator" (or in Windows 11/10 click directly on the entry that appears on the right, see image below).
  2. Confirm the opening briefly by clicking on "Yes".
  3. Then enter the command powercfg -h off and press Enter (alternatively, the command powercfg.exe /hibernate off also works).

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 the image gallery below (only pagefile.sys and swapfile.sys are still there).

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 memory 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.

So it will most likely take longer to start your PC without the hibernation file.

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 an administrator. You can 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 required 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 and reduce the size of the hibernation file in Windows 11 and Windows 10 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 input, a text appears with confirmation of the respective size - in my case:

The size of the quiescent state file was 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:

Shrinking 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)

You want 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.

With this command you activate the hibernation mode and specify the size of the hibernation file as a percentage of the installed memory.

Example: Here I have set my hibernation file to 80 percent:

Tip: Do not choose a number that is too small, otherwise the current memory content can no longer be inserted into the reduced hiberfil.sys.

Can I move the Hiberfil.sys?

Moving the hiberfil.sys to another drive is unfortunately not so easy.

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 instabilities 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

In Windows 10 and 11, Microsoft has optimized the handling of the hibernation file.

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 Windows versions, 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 the 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: The hiberfil.sys is a central system file that is responsible for the hibernation of your Windows PC. It stores the contents of your working memory to enable you to wake up quickly.
  • Delete & deactivate sleep mode: You can deactivate or delete the hibernation file to save storage space, especially if you are not using sleep mode. But keep in mind that sleep mode will no longer be available as a result.
  • Reduce size for memory optimization: If you want to save memory without giving up hibernation completely, you can reduce the size of hiberfil.sys in Windows 11 and 10.

FAQ

Source reference

Founded Windows Tweaks as a teenager in 2001, his helpful PC tricks made it Germany's most visited Windows site (at the time Sandro looked like this). He then went on to write for international publications such as PC-Praxis, Computerbild, PCWorld in the USA, IMTEST.de and Hifi.de. Sandro's main job is as Global Product Marketing Lead and Consultant for various global tech companies, including Microsoft, AVG, Avast, Nero, TeamViewer, Swiss IT Security Group and now currently in the fintech sector for Gendigital. But he can't get rid of his passion and shares his tweaks here again. Privately, he enjoys traveling the world and loves Asia, especially Japan, Singapore and Korea, but also natural places like Iceland and the Nordics. You can reach Sandro via e-mail.

2 comments on: hiberfil.sys: Delete the large file or use it to optimize hibernation in Windows (2025)

Leave a Reply to WIndows Tweaks Cancel reply

Your email address will not be published. Required fields are marked *

Windows Tweaks Logo Microsoft PC Help - 09 white 120
by Real Tech Experts
Save time and stress with expert knowledge about software, hardware, AI & Microsoft. 
Windows Tweaks Microsoft PC Help - SINCE 1998 - retina 2

Time-saving tips for PCs, laptops, Windows & software?

Subscribe to our newsletter and receive only our best guides & tweaks as well as exclusive tips for our subscribers. 
Newsletter-Form
Unsubscribe at any time. Approximately 1 - 2 emails per month. This consent includes information on revocation, shipping service provider, and statistics according to our Privacy Policy.
© 1998 - 2025 Windows-Tweaks.info
Made in Germany with ❤️ 
For all technology users around the globe.
This website runs on 🌳 GREEN energy
crossmenu