Shrink Hibernation File in Windows 10 and Reduce its Size

If you have hibernation enabled in your Windows 10, then a file hiberfil.sys exists in the root of your C: drive. Windows 10 stores there the memory contents when you hibernate your PC. You can shrink the  hibernation file in Windows 10 with a single command.

The hiberfil.sys stores the contents of RAM (random access memory) when you hibernate your PC. When your PC resumes from hibernation, Windows 10 loads the file contents again and writes it back to RAM. The hibernation file occupies a huge amount of disk space.

While you can disable hibernation, it is a bad idea. In Windows 10, Fast Startup depends on hibernation. If you disable hibernation, it won’t work.

You can shrink the hibernation file up to 50% of your installed memory capacity. Let’s see how it can be done.

Shrink Hibernation File in Windows 10 and Reduce its Size

  1. Open an elevated command prompt. To do it, type cmd.exe in the Search box(Cortana) and press Ctrl+Shift+Enter:open-cmd-elevated-1open-cmd-elevated-2
  2. Type or paste the following command:
    powercfg hibernate size 60

    This will shrink your hibernation file to 60% of the installed RAM. The new file size will be visible in the command output.shrink-hibernation-file-in-windows-10

  3. You can adjust size of the hiberfile.sys file in percentage of the total memory by replacing “60” with any desired value in the command above.

The hibernation file will be reduced in size.

To undo the operation, you can do the following.

  1. Open an elevated command prompt.
  2. Type or paste the following command:
    powercfg hibernate size 100

    This will restore your hibernation file to 100% of the installed RAM. See the screenshot:restore-hibernation-file-in-windows-10

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!

Author: The MFTNEXT Team

The MSFTNEXT project is a small team of authors who love to engage with the latest technology and gadgets. Being passionate Windows bloggers, we are happy to help others fix their system issues.

One thought on “Shrink Hibernation File in Windows 10 and Reduce its Size”

  1. Hi there. I tried this and it pops up “A device attached to the system is not functioning.”

    I’ve been having an issue where no matter what I do I can’t get more space cleared up on my PC’s C: drive and now it’s so bad I can’t even update my drivers. Of which system files take up 22.3Gb, the hibernation system file is 12.7Gbs Temporary files says 7.91 GB but I only see 112mbs to clear up when I click that.
    Every time I uninstall something it’ll say I am back up to about 2Gbs of free data but by time I can try to update my drives it drops to 110mbs again. Could really use some help on this.

Leave a Reply

Your email address will not be published. Required fields are marked *