18

Ok, so I know what hiberfil.sys is, and I want to use hibernation on my laptop.

But I have another hard drive active in my laptop, it's taken from my old one... and I want to get rid of the hiberfil.sys on that drive. But even with admin privileges I can't delete it.

Any ideas?

oKtosiTe
  • 9,776
Baarn
  • 6,774

5 Answers5

27

To delete restore file you can open command prompt with admin privileges and run command

powercfg -h off

Then reboot, and Windows should automatically delete your hiberfil.sys. If it doesn't, you can remove it manually.

Then running

powercfg -h on

restores sleep and hibernate functionality.

You can start command prompt with admin privileges by starting command prompt (Windows Key+R (Run), type cmd) and then right-clicking command prompt icon on task bar and selecting "Run as administrator".

Olli
  • 7,739
24

I wanted to do this in the easiest way possible, especially without rebooting.

Open a command prompt as administrator and go to the disk where hiberfil.sys resides. In my case:

C:\Windows\System32\> e:

In e:, check for hidden files:

E:\> dir /A:H

In the listing hiberfil.sys should show up. If so, delete it:

E:\> del /AS hiberfil.sys

I have to warn you: I don't know what happens if you do this with an active hiberfil.sys file. In my case it was on an old hard disk drive and was no longer needed.

Baarn
  • 6,774
4

If you really, really want to get rid of the file, you can always boot to something like a Linux or Windows PE boot disk, and then delete it.

If it was placed there by the current OS, it will come right back. However, from your wording, it sounds like it was placed on the old HD by an old OS that was on it.

Brian
  • 2,982
0

For forcing remove of hibernation file and mounting it use this:

sudo mkdir /media/Windows
sudo ntfs-3g -o remove_hiberfile <device> /media/Windows
sudo umount <device>
sudo mount <device> <mountpoint>

Instead of <device> use the correct device like /dev/sda4

Update

Sorry, I don't know why, but I thought you want to mount it on linux.

So, for removing it you can use a Live-CD, like ubuntu, and execute these command above.

xdevs23
  • 227
-1

Right click the drive, click Properties, and go to the Security tab.

Use the Edit button to give Full control to Users and Authenticated Users.

After that, you should be able to delete the file via the command prompt (make sure that you're using the correct current directory):

del /f hiberfil.sys

That should get rid of the file. I recommend changing the permissions back afterwards.

enter image description here