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

Martin Brinkmann
Mar 4, 2010
Updated • Apr 15, 2018

I built a new computer recently 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, e.g. WizTree, will do.


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, and of course, that you can't use hibernation anymore.

Reducing the size of the pagefile

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

Note: If you reduce the pagefile below the installed amount of RAM, Windows may not be able to create certain memory dumps anymore.

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.

Related articles

How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7
Article Name
How I Freed Up 12 Gigabytes Of Hard Disk Space In Windows 7
Find out how to free up disk space on the primary Windows partition by making two changes to the default configuration of the operating system.
Ghacks Technology News

Tutorials & Tips

Previous Post: «
Next Post: «


  1. M Azeem Sarwar said on October 15, 2017 at 4:57 pm

    Thanks a lot dearie… I freed up 4.6 GB on my detachable tablet pc that merely contained 23 GB usable space on C:.

  2. Mark said on May 4, 2011 at 6:58 pm

    There is slight performance decrease if you move the pagefile to a mechanical drive but not something that affects real world performance unless you have less than 3GB RAM and the OS is forced to constantly read and write from/to the pagefile.

    At the end of the day, those who have enough money to buy an SSD can easily afford to buy 6-8 GB RAM which leaves the OS to use very little pagefile.

  3. Mark said on May 4, 2011 at 6:07 pm

    Everyone keeps suggesting to disable or reduce the size of pagefile if you are using an SSD but why not just move the entire pagefile to another mechanical HDD? Problem solved. I am sure those who use an SSD for the boot drive also use a secondary mechanical drive to store all their files.

    The only problem I see is the hiberfil.sys file as it cannot be moved but at the same time disabling it is not an option for everyone. I usually encode videos or run video rendering jobs while I am away from the computer, leaving it unattended and if power fails when I am not around, my UPS is set to hibernate the PC instead of shutting down so that I can continue the encoding from where it left off once power returns. So hiberfil.sys is indispensable for me.

    1. Martin Brinkmann said on May 4, 2011 at 6:13 pm

      Mark this becomes less of a issue with every new generation of SSD. They get bigger and become better at reading and writing to the drive. Moving the pagefile to another drive may look like a good idea, but it goes along with a decrease in speed, obviously unless the other drive is a very fast drive as well.

  4. someguy said on March 15, 2010 at 9:10 pm

    Ani is retarded. The author is talking about SOLID STATE DRIVES. There is no reason not to make these tweaks as the access time on solid state drives is much faster.

    Recycle bin trick… great idea. I knew about it… but never really thought about it.

    1. Ani said on March 16, 2010 at 6:56 pm

      hard drive technology has nothing to do with OS system management.

      its true that SSD are much faster than Magnetic, but to yield more free space SSD is no advantage. u need a bigger disk. OS [win7] will need & take space as required by default irrespective of disk technology.

      and yes recycle bin tweak is ok, but its not a tweak really. recycleBin space allocation is not static but dynamic. it is unlike pagefile which pre-allocates give size. recycleBin fills up space as things are deleted. its like a threshold.

      grow up, learn more.

  5. mamac said on March 7, 2010 at 2:58 pm

    i have just saved 70gb by deleting restore points, 500 gb hdd, vista

  6. Ani said on March 5, 2010 at 12:17 pm

    Look, i have reading a lot regarding Win7 from a long time since RTM & also hav being using it. i am ‘geek’ kind of user.

    Win7 is a totally revamped OS whose system policies has been very much different for any older windows OS. many things has been optimised for win7 only. it is hiighly recommended not to tweak pagefile area unless otherwise. win7 uses highly aggresive usage policy for pagefile & memory management. it is more efficient than older OSes. however is u hav to do then dont make it so low. ur system may get unstable in heavy load condition & ur overall performance will slow down.

    Memory management algorithm of Win7 is somewhat rocket-science. dont mess with it. and dont use uninitiated suggestions & old theories wont work..


  7. Conditioned said on March 5, 2010 at 8:20 am

    Well, in most other os´s I have dealth with the ramsize + a little is recommended so you can do an analysis in case of core dumb/bsod.

  8. Tony said on March 5, 2010 at 4:50 am

    Your pagefile shouldn’t be on the same drive as your operating system, and even with Windows 7 should still be 1-1.5 x ram.

  9. Jasray said on March 4, 2010 at 10:42 pm

    May be best to read Mark Russinovich’s Blog on the subject in order to understand what happens when changing pagefile size:

    How Big Should I Make the Paging File?

  10. matt said on March 4, 2010 at 8:31 pm

    I have to agree with ken, the 1.5 rule is a hangover from the nt days (though its use was arguable in xp)

  11. Ken said on March 4, 2010 at 6:05 pm

    Hiberfil is obviously only required if you want to be able to hibernate your system. On a system with a space constraint it is an easy delete.

    However, your comment regarding pagefile.sys being used for “disk caching” is incorrect. It is actually used as an extension of your RAM. Operating systems move inactive RAM pages to this swap file, freeing up more of the physical ram for applications that need it.

    Current best practices are to leave the management of the swapfile size to the operating system. By limiting it as you have, you are at risk if the system ever needs more memory than you have allocated.

  12. tuna said on March 4, 2010 at 6:02 pm

    You can refrain from losing up to another 8GB by reducing the Recycle Bin size. Default 10% is overkill these days.

  13. beachbuoy said on March 4, 2010 at 4:10 pm

    You are misguided in directing your focus on reducing the size of the pagefile and eliminatging the hiberfil file. Your focus should be on getting a larger hard drive. Or, better yet, add a second hard drive, a standard 7200 RPM hard drive, to the system an put the pagefile (a large one) on the second drive. Placing the pagfile and hiberfil file on the second drive will improve overall system performance and save even more space on that puny 80 GB solid state drive. Don’t penalize Windows 7 because just because you didn’t put enough storage on your new computer.

  14. ALeX said on March 4, 2010 at 3:34 pm

    Generally, the rule is to have the pagefile file 1.5 times your RAM. The thing is that the more RAM you have the less you need a pagefile (unless you constantly push the Ram to it’s limits..). I think you should be fine with 1gb.
    Hibernations is a no-brainer, if you don’t use it disable it…

  15. Mike said on March 4, 2010 at 3:31 pm
  16. Hartza said on March 4, 2010 at 2:17 pm

    I have almost same configuration, first I run win7 without pagefile, but some games required page file so now I have it 128mb. I have decoded digital hd camera videos 5gb and it works without any problems..

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.