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

54

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.

54 COMMENTS

  1. Easiest way is to create a shortcut on the desktop as “powercfg.exe -h off” without the quotes then right click it and “Run As Administrator”.
    Job done

    • Thanks! Great hint, I have been searching for this for the past three hours… It works too. I am useing the 64 bit Win 7 RC and couldn’t find anywhere to turn hibenation off.

  2. I install Windows 7 Ultimate 64 on my laptop which was shipped with Vista Home Basic from manufacturer. I did all the necessary prerequisite checks prior to installing Win 7 and my computer is compatible. Did a custom installation, not upgrade. Everything seems to work fine…however when I right click on a file to use the built-in checksum feature of Windows Ultimate it does not come up. Instead, what i see is the menu items that were seen in Vista. I know it exists as I have used it on my desktop which is running Windows 7 Ultimate x64 as well.

    Can anyone tell me what the problem might be? Thanks in advance

  3. Wow, just freed up 5 gigs of disk space! Cheers! Now, how about pagefile.sys too? I know, it's virtual memory, but I've turned it off but pagefile.sys is still gobbling up 6 gigs of my disc space.

  4. say i want to backup my system with a tool like easeus todo backup.. in a pe envioronment, i can safely 0 byte the pagefile.sys, but hiberfil.sys, i can’t touch at all.. why is that? logic says if i’m backing it up, i could just script a powercfg.exe -h on at startup, but kinda ridiculous too… (0 byting it temporarily until it reboots, and system would restore it (at least, pagefile.sys gets restored immediately..)

  5. windows 7 user to delete by using run command with permission on alt+clr+enter ok…………
    enjoy and for seing

    its working not jock…………….

  6. useful trick bt plz tell dat how to permanently delete hiberfil.sys bcoz when we switch on hibernate function by “powercfg -h on” same file reappears with same size and eat up the memory space

    • Hiberfil.sys is that same size as your physical RAM, this is because it is an image of your RAM. If hibernation is turned on this file will always be there, because it is an image of your RAM. If you want to reduce the size of the file, remove some sticks of RAM.

  7. I have a Windows7 x64 Professional.
    I went to the Start menu, right click on Command prompt -> Run as administrator. I typed “powercfg.exe -h off”. I restarted the computer but hiberfil.sys file wasn’t gone. I restarted my computer with my Windows7 boot disc and started the command prompt. I was able to delete the hiberfil.sys file. Hurray! But when I was restarted my cmputer and loged on Windows7, the hiberfil.sys file was there again. 🙁
    I tried the safe mode also, but it didn’t work.

  8. joeletaxi, thanks a lot! Cool trick! Since SP1 installation, this file has allways been sitting in free space. Now I have “took care” of it. Yeees! 🙂

  9. Muito grato. Realmente funfou a dica do:

    joeletaxisays:
    July 11, 2009 at 2:02 am
    Easiest way is to create a shortcut on the desktop as “powercfg.exe -h off” without the quotes then right click it and “Run As Administrator”.
    Job done

    Agora como ativar pelo mesmo modo???

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

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

  11. 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)

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

  13. Of limited use, as it does not tell me how to “Make sure you are an administrator”.!! I have 26 gb tied up in hyberfil crap!! Now I need to go figure out how to get to CMD in the administrator mode.

  14. Did make the startup times(from powerup to desktop) faster for my win10 ssd laptops:
    10 year old laptop startup time from 58 to 40 seconds.
    5 year old laptop startup time from 35 t0 25 seconds.

LEAVE A REPLY

Please enter your comment!
Please enter your name here