cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting hibernate.sys

Moderator
Moderator
Posts: 18,080
Thanks: 2,618
Fixes: 192
Registered: 06-04-2007

Deleting hibernate.sys

I never use hibernate on my PC but the hibernate.sys file is there taking up almost 5GB - not a huge amount but I'd like to free it up nonetheless.
Looking at Power Options > Advanced settings there are no options for hibernate under Balanced (Active), High performance or Power Saver.
If I run the Command Prompt as Administrator and enter powercfg.exe -h off or powercfg.exe -hibernate off I get the message "'powercfg.exe' is not a recognised as an internal or external command, operable program or batch file."
Meanwhile, I still can't delete hibernate.sys.
Any ideas, please?

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

10 REPLIES
pwatson
Rising Star
Posts: 2,468
Thanks: 8
Fixes: 1
Registered: 26-11-2012

Re: Deleting hibernate.sys

Which version of Windows are you running?
Community Veteran
Posts: 38,460
Thanks: 1,027
Fixes: 62
Registered: 15-06-2007

Re: Deleting hibernate.sys

That isn't the correct command http://helpdeskgeek.com/windows-7/windows-7-delete-hibernation-file-hiberfil-sys/
It should be powercfg –h off
pwatson
Rising Star
Posts: 2,468
Thanks: 8
Fixes: 1
Registered: 26-11-2012

Re: Deleting hibernate.sys

The syntax of the command is a moot point if powercfg.exe can't be found...
Moderator
Moderator
Posts: 18,080
Thanks: 2,618
Fixes: 192
Registered: 06-04-2007

Re: Deleting hibernate.sys

@pwatson Sorry, should have said it is W7 Pro 64
@Oldjim I didn't think it made a difference whether adding the suffix 'exe' or not. But I tried without it with the same result Sad

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

pwatson
Rising Star
Posts: 2,468
Thanks: 8
Fixes: 1
Registered: 26-11-2012

Re: Deleting hibernate.sys

Try looking for powercfg.exe in c:\windows\system32  That's where it resides in Win 7 Home Premium
Moderator
Moderator
Posts: 18,080
Thanks: 2,618
Fixes: 192
Registered: 06-04-2007

Re: Deleting hibernate.sys

It's there. I changed the directory in the Command prompt using the CD command then ran powercfg -h off again (and powercfg -hibernate off) and never received an error message. From what I read that command should turn off Hibernate and delete hiberfil.sys but it's still there and manually deleting doesn't work as I need permission from Administrators. There is only one user on this PC! Perhaps it will disappear or I can delete after a reboot Undecided
Out of interest, I forgot to mention in my OP that the Option for Hibernation is not included in the Start Menu.

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

sjptd
Grafter
Posts: 467
Registered: 01-09-2014

Re: Deleting hibernate.sys

You can try finding 'cmd' in start menu, right clicking, and 'Run as Administrator'.
Then in the command prompt do a 'cd \' and 'erase hiberfil.sys'
You may need to do an 'attrib -s -h hiberfil.sys' before the erase will work; not quite sure.
Then exit the command prompt at once before you accidentally type something else you regret.
Moderator
Moderator
Posts: 18,080
Thanks: 2,618
Fixes: 192
Registered: 06-04-2007

Re: Deleting hibernate.sys

The file is in the root D: folder so I set it to that but I got a 'Could not find D:\hiberfil.sys' message.
Thinking about my reply #6 I went to hiberfil.sys Properties > Security > Advanced and selected Full control then Apply. Hey presto I could delete the file Smiley
I'll need to reboot a little later so will check to see if it's come back.

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

RobPN
Seasoned Pro
Posts: 1,095
Thanks: 212
Fixes: 3
Registered: 17-05-2013

Re: Deleting hibernate.sys

Try typing powercfg -hibernate off (that worked for me)   Wink
Edit:  (Whereas powercfg -h off gave the syntax error message)
Moderator
Moderator
Posts: 18,080
Thanks: 2,618
Fixes: 192
Registered: 06-04-2007

Re: Deleting hibernate.sys

As I said above I tried both versions once I set the directory to c:\windows\system32  with no error for either.
Following from my last message the hiberfil.sys file has not returned after a reboot so all seems good.
Thanks for all the help Smiley

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still