Win 7 Disk Space Guide: How to remove pagefile and hiberfil

SSD drives offer lightning fast access, read and write speeds. Unfortunately they are still rather expensive and the amount of space is limited. Especially with Apple computers such as the Retina Macbook Pro or the Macbook Air, an upgrade to an 1TB Flash Storage can be as expensive as $800.00. If you, for instance, want to install Bootcamp on your Macbook, you usually need to sacrifice a lot of disk space. As soon as you launch Windows 7 for the first time, you’ll realise that you don’t have much space left because two huge files are taking a lot of space: Pagefile.sys and Hiberfil.sys. But what do they do? And how can you safely remove them? This guide will help you to deal with them and increase you free storage space. Following this process, I was able to get more than 27 GB of free disk space.

Table of Contents

What do pagefile.sys and hiberfil.sys do?

Both pagefile.sys and hiberfil.sys are automatically added by Windows and have their purpose. Pagefile.sys is basically a hard disk based RAM extension. If you’re heavily using your computer, there is a chance that your built-in RAM is not enough. In this case, Windows moves the least used information from the RAM to the pagefile. Unfortunately, Windows is already blocking this space on your disk without before actually using it. Depending on the size of the file, this might actually be quite a lot of space. With the 15” Retina Macbook Pro coming with 16 GB of RAM and the 13” model with at least 8 GB, there is a good chance that you won’t really need a pagefile at all or can at least reduce it to a certain extent. Please be aware that it’s not recommended to tinker around with the pagefile.sys if your RAM usage is high.

Just like the pagefile, hiberfil.sys exists for a reason but can be removed depending on your usage. But let’s start from the beginning: Windows comes with two power management modes which are called Sleep or Hibernate. While Sleep puts your computer into a low power state, Hibernate will write the memory into a file and then completely powers off the computer, making it possible to return to the previous state even after removing the battery. The question that you have to ask yourself is whether you actually need both power modes, especially Hibernate. If your answer is no, you can easily go ahead and deactivate the hibernation mode.

How to remove pagefile.sys and hiberfil.sys

In the following, I’ll explain how to safely disable the required settings and how to safely remove both pagefile and hiberfil. Have a look at the gallery below for step-by-step screenshots.

Pagefile.sys

  1. Run sysdm.cpl in the run box (Win + R) and navigate to Advanced –> Performance Settings –> Advanced –> Virtual Memory –> Change 
  2. Completely disable pagefile.sys or decrease the size.
  3. Reboot
  4. Depending on your settings, pagefile.sys should now be smaller or completely gone.

Hiberfil.sys

  1. Open your command prompt as an admin
  2. Type the following command and confirm with enter: powercfg -h off
  3. Hibernation mode is now gone and hiberfil.sys deleted

As you see, following these simply steps, I was able to get more than 27 GB of free disk space. I hope that this guide helped you.

5 Comments
  1. Jonathan Laliberte says

    thank you!

  2. Saumya Prakash Mishra says

    Thank you Philipp. You are a savior.

  3. Velasco says

    Thanks you bro, u save my disk hahaha..

  4. Alejandro Suazo says

    wow! I downgrade from win 10 to win 7 for audio production, and now all run flawlessly and smooth, and with this fantastic guide, my little SSD go big! Thank you!

    1. WaLLy says

      You know Windows 10 is more heavy than Windows 7, if Windows 7 wouldn’t run flawlessly and smooth tthan there is something wrong with your pc. If you have problems running Windows 10 you should concider a upgrade for your pc. Keep it in mind if you might experience any trouble.

Comments are closed.