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.
- Run sysdm.cpl in the run box (Win + R) and navigate to Advanced –> Performance Settings –> Advanced –> Virtual Memory –> Change
- Completely disable pagefile.sys or decrease the size.
- Depending on your settings, pagefile.sys should now be smaller or completely gone.
- Open your command prompt as an admin
- Type the following command and confirm with enter: powercfg -h off
- 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.