How-To Geek

What is hiberfil.sys and How Do I Delete It?

You’re no doubt reading this article because there’s a gigantic hiberfil.sys file sitting in the root of your drive, and you want to get rid of it to free up some space… but you can’t!

Luckily, you actually can delete it, and today we’ll show you how. This should work in Windows Vista, 7, 8, 10, or even XP. The screens are going to look different depending on the version, but the command line argument is the same for all of them.


The more memory you have in your PC, the bigger the file will be.

So What is hiberfil.sys Anyway?

Windows has two power management modes that you can choose from: one is Sleep Mode, which keeps the PC running in a low power state so you can almost instantly get back to what you were working on. The other is Hibernate mode, which completely writes the memory out to the hard drive, and then powers the PC down entirely, so you can even take the battery out, put it back in, start back up, and be right back where you were.

Hibernate mode uses the hiberfil.sys file to store the the current state (memory) of the PC, and since it’s managed by Windows, you can’t delete the file.


So if you never use it, and want to disable Hibernate mode, keep reading. Personally I stick with Sleep Mode the vast majority of the time, but I do use Hibernate quite often.

Disable Hibernate (and Delete hiberfil.sys) in Windows 10, 8, 7, or Vista

You’ll need to open an administrator mode command prompt by right-clicking on the command prompt in the start menu, and then choosing Run as Administrator. Once you’re there, type in the following command:

powercfg -h off

You should immediately notice that the Hibernate option is gone from the Shut down menu.


You’ll also notice that the file is magically gone!


For more about dealing with Hibernate like setting how long it takes to head into Hibernate mode, you can check out our article on How to Manage Hibernate Mode in Windows 7.

Disabling Hibernate Mode in Windows XP

It’s a lot easier in Windows XP to get rid of Hibernate mode… in fact, we’ve already covered it before, but we’ll cover it again. Just head into Control Panel –> Power Options, and then find the Hibernate tab.


Uncheck the box, reboot your PC, and then you can delete the hiberfil.sys file.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 04/21/13

Comments (62)

  1. Ben

    “It’s a lot easier in Windows XP”

    Yes, find your way into some dialog, uncheck a box, restart your computer, and manually delete the file from your hard drive. Assuming you have hidden files and folders, and protected OS files shown to you in the settings.

    What a complete joke, its obviously much easier in 7. Type one command and you’re done. No reboot, no need to find the file and delete it. It’s this kind of vast and utter disrespect for Windows 7 that makes me sick. Your “XP way” is a lot more work and the only reason you say its “easier” is because you’ve done in that way since Windows 95 when that dialog box showed up. Although I suppose you probably also loved the “Save XP” campaign so I guess I shouldn’t be surprised to see such statements anymore.

  2. Nawlins Jeaux

    Interesting… but how do you re-enable it, if you decide later that you want it? powercfg -h on?

    Next question, not being a true geek, would be: Is there another way to turn off hibernate that you don’t need to write down, or memorize, the command line entry? I’d hate to think I’ve turned it off, and never be able to turn it on, again.

    Keep up the good work, HTG!!!

  3. Valter Henrique

    thx, very useful.

  4. MaxellDVD

    What’s more, the powercfg way works in Windows XP as well.

  5. Tom

    Actually, on XP, after unchecking the “Enable Hibernation” checkbox, the file was deleted automatically. No restart needed. Pretty simple.

    And Ben, that was pretty easy. What would I rather do? Go to Control Panel -> Power Options, and disable it there, or have to search the internet for the proper command to disable it from the command line? Which one is easier for everyday-Joe?

    And I usually use Linux, so don’t tell me that I must hate the command line.

  6. Mosh

    I’m running an old Acer laptop on XP and when you go to the Control Panel applet you’re redirected to an Acer specific one with no option to disable hibernate mode.

    Instead, from a command prompt:

    powercfg /hibernate off

    …will disable it *and* remove the .sys file automatically. No reboot required.

  7. Tek9

    Actually, “easy” is a matter of perspective. I imagine for quite a few users, finding the command prompt, let alone managing to right-click on it and select run as admin might well be the most challenging task they’ve ever been asked to perform on a PC. As opposed to using the more familiar windowed solution in XP. I get people freaked out all the time at my work when I make them go in to a command prompt.

  8. Not Ben

    Um, Ben, I think it’s “easier” because the majority of us use the GUI, not the command line like your high-and-might self are proclaiming to be superior.

  9. HTF

    The command prompt way isn’t HARD, just daunting to people who don’t use the command prompt. For me, it’s about halfway up the recently opened programs list in the start menu.

    I’m no tech guru, though, I just use ping to see how much Comcast is sucking on any given day. *grumble*

  10. rbailin

    Disabling hibernate will also disable hybrid sleep, which write memory out to hiberfil.sys before putting the system into sleep mode. In the event of a power failure (or in the case of a laptop whose battery gets depleted), the system will restart as if from hibernate mode instead of instantly from sleep mode. No data will be lost.

    In the event of a power failure without hybrid sleep, the system will resume with a cold boot after a power failure, and will complain that it was not shutdown properly last time.

  11. MaxellDVD

    While I don’t think everything must be done by CLI, some comfort around a command prompt is a good thing, and can be faster than GUI in some cases. People shouldn’t be as afraid of it as they are.

    As far as problems finding it. In Vista/7, Winkey/startsearch-“cmd”-ctrl+shift+enter

    But people are afraid of the keyboard.

    @Nawlins Jeaux: Create a shortcut with the powercfg line as the target.

  12. Martin

    Anyone know how to have the hiberfil.sys file stored on another drive or partition? I’d like to have one, but don’t want it on my C: drive.

    Thanks in advance.

  13. Kevin

    If you delete this file won’t that disable hibernation?
    Martin, I think it has to be on the same partition to create the virtual “saving of open programs” so to speak while the computer sleeps and is powered down. Good point though

  14. calebstein

    @Kevin: You can’t delete the file while hibernation is enabled, because the file is system owned.

  15. LeanToshi

    Fortunately, views on computer systems don’t create any form of illness on me. I do find it fascinating that individuals defend an inanimate OS with great vigor and viterol (sorry, promoting a family law firm). Anyway, I’m XP on a half-dozen comps and found myself unable to get rid of the huge hibernation file, turning it on or off, no matter. It was there to stay. The command line deleted it instantly and I appreciate this post.

  16. Archon

    Thanks, just what i was looking for !!

  17. Craig - The 7thDwarf

    Hey Cool,

    Cheers Geek! I was wondering if it would work the same for 64bit Win7, but Yes!

    Thanks for your help.


  18. Kevin

    Love the Geek.

  19. Rey

    You may also check this if you do not want that file…
    Control Panel > Power Options >Hibernate
    Uncheck ‘Enable Hibernation’.
    This should free up some space.

  20. Derald H

    Tried the powercfg-h off and my windows vista home premium told me it was not a valid command. Tried different spacing, caps, no caps, all the usual little things till my comp. started getting annoyed-so, what next?

  21. gren

    You can turn Hibernate off in the Windows 7 control panel as well. I don’t know why this article doesn’t mention that, but thanks for the tip.

  22. Donna


    I have the same problem Martin has only mine is on a D: drive. Your solution worked for the one on the c drive but I have dual installations of Vista Home Premium (formatted c last year and reinstalled Vista but kept the old hard drive and have all that wasted space with Vista installed THERE too… cannot delete the D:\hyberfil.sys because my bloated computer won’t give me permission to do it (another reason I dislike Vista).

    I would love to get rid of the 2nd (older) installation of Windows entirely but have no idea how.

    Thanks for your fabulous site, I’ve gotten lots of great answers to problems here.


  23. nana

    My computer install Windows XP, I don’t find hiberfil.sys. HELP ME!

  24. nana

    OH, I found the answer to that problem!

  25. installation


    probably ntfs permissions, adjust them (‘take ownership’ option), this is nothing to do with vista

    it’s the same if you took the drive of an xp install & attempted to view mydocuments of a passworded user, it will say access denied since the ntfs permission for that folder is expecting a specific user

    …unless the new vista install is using the files in the old one’s drive??

  26. Never@home

    Thank you. Did the trick. It helped me avoid, for the time being, re partitioning my c drive HD to allow more space for the operating system. …and all the tasks/time involved with that. For now this will save me loads of time.

  27. oldskool

    hiber-what? sleepy time? what the hell? if ya press the power button and the darn thing dont shut off dont yall just pull the cord out to make it stop like we did in the old days? GUI? thats that pretty flashin thing in front of all the lettrs i type right? :)

    Why did they have to make everything so complicated? press the button once it comes on, press it again it turns off, no bullcrude. nice and neat.

  28. Sam

    Tks Guys / Gals that was easy enough – you saved me a huge job. Much appreciatted – keep it going.


  29. modifieda4

    command line is much easier and can be put into a batch file for quick disabling/enabling for defragging/disk cleaning

  30. Ruperts

    Yup it work on my current laptop with Windows 7 and on another with XP. Many thanks to all.

  31. Melissa

    Access on my pc is denied!! And some connected ass gets putting it back!!!

  32. Alexis

    Thanks a lot !

  33. Travis Stein

    Thanks for the painless tip! Now I’ve got about 3 more gigs free and on a smaller SSD drive, that makes a world of difference :)

  34. Simple

    Sure sounds like “little” Ben is an advocate for Win7. Obviously he doesn’t like to do a task that requires more than 1 step. Might be too much for his drug induced mind to handle. Only thing that kept Ben out of the 6th grade was 5th grade!

  35. Empty

    Thx alot,
    its work on my w7

  36. benjamen

    Go easy on Ben, he gets sick very easily…
    Oh, to be so emotionally atttached to a commercial product which likely is not of one’s own doing.

  37. Patio

    I get

    You do not have permission to enable or disable the Hibernate feature,

    So what can I do about this?

  38. happy camper

    Hey thanks for the info, worked great and saved me about 8GB for actual files on my SSD drive :)

  39. mongo

    When I initially tried to run the command prompt as instructed, I received an error that that it was not a recognized command. I noticed the example showed the command being run in the windows/system32 directory, so I switched to that directory and the command worked perfectly, thus freeing up an extra 9gb on my small 64gb SSD.
    To switch directories, I first typed in “cd /” and then “cd windows/system32”. Then just type the command as shown above.

  40. Nick

    wow, THANK YOU!

  41. Tracey


  42. Mike

    Thanks guys, you rock!

  43. Leon

    Hi There

    I’m looking to find out when hiberfil.sys is accessed? Is it only when the system goes into actual hibernation or every time the machine starts-up and shuts down?

    Does the presence of a program in hiberfil.sys indicate it was used recently or only when the machine actually hibernated?

    I need this info for a court case and cannot find the info I’m looking bfor elsewhere.

    Thanks for your help.

  44. madking

    Oh for the good old days of DOS (sighs!)

  45. jlreaa

    It took a while but I found an article in windows support that told how to re-enable hibernate using the cmd line. Same as this article only using the on switch.

  46. Al

    I have tried to delete heberfil.sys but haven’t had any luck.
    I’m running windows 7 professional 64 bit.
    Using administrator mode command prompt and typing powercfg -h off.
    It’s still there, even after re-booting.
    The file is over 6gb.
    Any other solutions?

  47. Varinder Sabharwal

    Yup it worked well on my current laptop with Windows 7 , Many thanks to all.

  48. Varinder Sabharwal

    Now can u pls tell me how to get rid off “pagefile.sys” which is also covering ample space of my system

  49. Scott Payton

    Totally Awesome. Thanks for that!

  50. mawuli frimpong-manso

    off 2 show it off

  51. ستار نیاکان

    tnx very usefull

  52. Steve

    Thanks that works for me on my win7 pro. at the price of this software there should be a file showing the cmd commands and their functions. like back in the day with dos, you got an entire book of detailed operation with the os.

  53. Electro

    I agree with Steve. :-)


    Varinder – You do NOT want t o delete your pagefile.sys – it is critical to your PC.

  54. julian

    Que buen post!!! me salvaste

  55. Sunny

    Very simple and useful

  56. ugotuf

    how can i enable hibernation on xp sp3,mine keeps telling me that process cannot access the file ‘cos another process is using it?

  57. Manoj

    it’s really useful.very very thanku.and i want to delete pagefile.sys also because it takes about 2GB memory of my hardisk so what can i do.

  58. Jacob

    I have Windows XP Pro running service pack 3 on a stationary PC.
    I have no hibernate TAB in the power options menu, but i still have a 3,4 GB hiberfil.sys!
    How do i get rid of it?

  59. Brian

    You should add a +1 button to this page, great info!

  60. Kitsune

    Tom, you must hate the New Ubuntu feel, with it so flashy and not allowing you to shut down without tweaking your install first

  61. Nirmal

    Thanks for solving my big problem.

  62. papacus

    to ben
    Disrespect Win 7? Give me one good reason to respect a stupid white elephant that starts at 13 Gigabytes in size and the sky is the limit, and makes all computer illiterates feel like they are computers experts, when they still ignore what to do in the same Windows 7?
    To my knowledge, 7 users do not know their way around with computers and have to stick to specialized programs to achieve the minimum required for his task.
    Probably Windows XP is daunting for you, too?
    DOS=disk operating system, that was command line based, beginning of Windows, should be a impenetrable mental wall for some.
    I think that is the other way around of what you think, where XP should be kept and 7 never seen the light of day.
    Everybody would be better served and educated.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!