How to Delete hiberfil.sys and Recover Disk Space on Windows

Desktop computers rarely need to hibernate, so you can probably safely remove the hiberfil.sys file and save yourself a few GB of space. To do so, just open up a new command prompt as an administrator:

  1. Click on the Start button
  2. Type ‘cmd’ (don’t hit enter)
  3. Right click on the Command Prompt that comes up and choose Run As Administrator.

Once you have an administrator command prompt up, just run this command:

powercfg.exe /hibernate off

Now check your disk space again and you should see the hiberfil.sys file is gone.

If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.

Keyboard shortcuts

?
Show this help
Esc
Close this help or an open menu
n
Next (newer) post: Which is more important, line coverage or branch coverage?
p
Previous (older) post: Configure Visual Studio to Name Private Fields with Underscore
Tab
Move between links and buttons (Shift+Tab to go back)