What is hiberfil.sys and how to delete in Windows 7 free up hard drive space

42

As from our last post, why your hard drive is always shrinking even though you did not do anything, we talked about using the freeware TreeSize to view where you have the largest chunk of data on your hard drive. If you look deep enough you will find out that there are two files called pagefile.sys and hiberfil.sys that occupy over few GB of your hard drive space. If you are the kind person that does not use Hibernate then this article is for you.

What is hiberfil.sys file for?

When you turn off your computer using hibernate, the operating system needs to store all your current running program states onto the hard disk so that programs can resume where they left off when you power up your PC again. To achieve this, the OS need to save all the information into a file called hiberfil.sys. Windows OS (7, Vista, XP) usually stores this as a hidden file under your system root directory or your main OS partition.

So if you never use hibernate, then it’s time for you to get your hard drive space back.

Note: Hibernate mode is different from the sleep mode. When a computer is put in hibernation, it completely shuts down and consumes no power. However, when it’s in sleep mode, it still consumes a small amount of power. Since it’s not completely shut down, computers in sleep mode return to life usually are faster than the one from hibernation mode.

How to delete hiberfil.sys file?

The best way to delete hiberfil.sys is to disable hibernation in Windows:

  1. Go to Start menu, type “cmd” open up command prompt
  2. Type “powercfg.exe -h off” [make sure you are an Administrator]
  3. ENTER
  4. Type “exit”
  5. ENTER

051109 0314 whatishiber1 - What is hiberfil.sys and how to delete in Windows 7 free up hard drive space

RESTART YOUR PC and you are all set

After the restart, you should be able to see more free space on your hard drive.

SHARE

42 COMMENTS

    • hey ,
      open your command prompt with rus as administrator ..
      right click on cmd then click on rus as administrator

  1. hiberfil.sys can be found in c:   using dir /AH /AS
    what I can’t do is delete it because it is in use. Switching hibernate off gets rid of it but hibernate on brings it back same size as before – thats a lot of disk

  2. worked great, thanks
    (select run as administrator when opening command prompt, open using run ‘cmd’, then pin to start menu, then close, reopen with right-click, select run as admin; or navigate to cmd in accessories, i believe)

  3. Thanks. I didn’t know about powercfg.exe. In older versions of Windows, I did this by turning on/off hibernation in the power control panel applet. Windows 7 doesn’t have that option. I didn’t want to permanently delete hiberfil.sys, but I did want to force the system to re-create it (so I also did powercfg -h on). I had upgraded my PC to 16 GB RAM, but my hiberfil.sys was still only 12 GB. Whenever my PC hibernated, it froze. When I turned hibernation back on, the new hiberfil.sys was only 12 GB again. I’ll cross my fingers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here