How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7

0
234

I recently build a new computer system that uses Windows 7 Professional 64-bit as its operating system and a very fast Intel Solid State Drive with 80 Gigabytes of storage space as the primary hard disk.

More than half of the hard disk was filled with data according to Windows 7 shortly after the installation of the operating system and some necessary software programs.

That was a lot and quite worrying at first as I had plans to install some bigger applications and games on that drive as well without breaking the 20% rule which suggests filling no more than 80% of the hard drive with data to avoid performance impacts.

I decided to run a hard disk analyzer for a visual display of the files and folders that use most of the space on the hard drive. Disk Space Fan was my choice but any hard disk analyzer will do.

Findings

I noticed that two files that were using 14 Gigabytes of space together: hiberfil.sys with 6 Gigabytes and pagefile.sys with 8 Gigabytes. Hiberfil.sys is used for hibernation, a feature that I’m not using at all while pagefile.sys was the data that the Windows set the pagefile to which is used for disk caching purposes.

Eight Gigabyte sounded a lot considering that the computer had eight Gigabytes of computer memory installed.

I therefore decided to disable hibernation completely to free up the six Gigabytes it was using, and reduce the pagefile size from eight Gigabytes to a maximum of two. This freed up 12 Gigabytes of hard disk space on a 80 Gigabyte hard drive, not bad I think.

Disabling Hibernation

disable hibernation

The easiest way to do this is to open an elevated command prompt (by right-clicking the cmd tool in the start menu and selecting the run as administrator option). The command to turn off hibernation in Windows is powercfg.exe -h off.

A restart is required for the changes to take effect. Windows will remove hiberfil.sys from the system which frees up the allocated disk space.

Please note that Windows does not display a confirmation when you run the command. You can turn it on at a later point in time with the command powercfg -h on.

The only downside of turning off hibernation is that the system start may take longer.

Reducing the size of the pagefile

Windows uses the pagefile for caching purposes even if enough RAM is available.

The pagefile can be controlled in the Windows control panel. Use the shortcut Windows-Pause to open the System Control Panel. Select Advanced System Settings, and then on the settings button under performance.

Last but not least, switch to the advanced tab when the Performance Options window opens. Windows lists the total paging file size for all drives there. Click on change to configure the feature in detail.

windows pagefile

The configuration window lists all storage devices and the page file for each of them. First thing you may need to do is disable the automated mode that Windows uses by default.

Once done, select a drive and pick one of the following options:

  • Disable the paging file for the drive.
  • Set a custom size with initial and maximum values in Megabyte.
  • Let Windows handle the page file size automatically.

While you may not want to turn off the pagefile for the primary hard drive, you could consider turning it off for other drives. Also, you could reduce the size of the page file to free up disk space.

The two little configuration changes freed up 12 Gigabytes of storage space on the hard drive allowing me to install the applications that I wanted without breaking the 20% rule. Do you have additional tips for saving up space on the primary partition? Let us hear them in the comments.

Update: Please note that you may use the methods in newer versions of the Windows operating system as well.