How to Free Up Hard Disk Space Without Deleting Anything Important
Written by Hongkiat/ Courtesy of
I once wanted to install a 9GB game on my 20GB system drive with just 1GB free space (was the requirement of the game). With little to no room for deleting any data, I had to look for ways to free up space on my C drive that doesn’t involve deleting important data. With a few hours of tinkering, I managed to free up 13GB of space without deleting even a single important file.
System drive (C drive usually) has many system files/folders such as temporary files, app data, libraries, etc. that can increase in size as you use your PC; eventually taking up all the space. You can move such files and folders to another drive to make space in your system drive.
So, in this post, I’ll show you how to move large system files/folders to another drive and make them usable from there, and get rid of unnecessary data or features to free up space.
1. Decrease or delete hiberfil.sys file size
If you open hidden files on the C drive, you would see a huge file named hiberfil.sys. This file is used by the hibernate feature of Windows to move all the processes from RAM to this file when you put your PC on hibernate mode. The file size is equal to 75% of your total RAM installed.
Therefore, if you have 16GB of RAM, then hiberfil.sys size would be 12GB. Thankfully you can either decrease or delete hiberfil.sys file to free up space on the system drive, here’s how to do it:
If you don’t always have loads of processes open before using hibernate mode, then you can decrease hiberfil.sys size to free up space. The 75% threshold is only there to ensure you are able to use hibernate feature even when almost all of the RAM is filled with active processes. However, most people can survive on 50% hiberfil.sys size as well.
To decrease hiberfil size, you first need to open an elevated command prompt window.
- In Windows 7 and below, open start menu and go to All Program.
- Here right-click on Command Prompt shortcut and select Run as administrator from the context menu.
- Windows 8 and 10 users can press Windows + X keys and select Command Prompt (Admin) from the list.
In the command prompt, enter the below command and hit enter:
powercfg -h -size 50
This will decrease the
hiberfil.sys size to 50% of your RAM. You can replace 50 with any number you like, but it must be below 75 and above 50 (you can’t choose below 50).
Delete hiberfil.sys File
If you don’t use the hibernate feature of Windows, then you can simply turn it off and claim all the space hiberfil.sys file was taking. To do so, open elevated command prompt window again and enter the below-mentioned command:
powercfg -h off
This will turn off the hibernate feature. You can easily turn it back on if needed by using the command
powercfg -h on
2. Move Pagefile.sys file to another drive
Pagefile is the virtual memory that Windows uses to allocate some of the processes in the RAM. Pagefile is crucial for the proper working of your system as it keeps the RAM free by saving passive program processes on the hard disk.
However, it’s size is almost as big as your actual RAM and sometimes even double the size of physical RAM. So if you have 8G or 16GB of RAM, then the pagefile.sys file will also be near that size.
On top of that, pagefile.sys also resides on the system drive by default, i.e. in the C drive. Thankfully you can easily move pagefile.sys to another drive with more space to free up space on the system drive. Here is how to do it:
1. Press Windows + R keys and type
sysdm.cpl in the RUN dialog to open System Properties.
2. Here move to the Advanced tab and click on Settings under Performance.
3. Move to Advanced tab here as well and click on Change.
4. Uncheck the option “Automatically manage paging file size for all drives” option and you’ll be able to edit the options below it.
5. Select C drive here and then select No paging file below.
6. Now click on Set next to it to turn off pagefile.sys on the C drive.
7. After that click on the drive where you want to move the pagefile.sys and select System managed size under it.
8. Simply click on Set again and pagefile.sys will be moved to the chosen. You will have to restart the PC to let this change take effect.
Note: If you didn’t gain any space after restarting the PC, then go to C drive and unhide hidden files. You should see the pagefile.sys here, just delete it like you normally delete a file and it will be removed.
3. Compress all the data
Many people don’t know that Windows has a built-in compression tool that can compress content inside your NTFS formatted drives. You can either compress specific folders or even the whole drive to save space. Best of all, you can still use the compressed data like you normally do without any errors or special configurations.
The trade-off here is that every time you will access a file or program, it needs to be decompressed before opening; which can be both good or a bad thing depending on your PC specs.
When you will launch a compressed program/file, your CPU will quickly decompress it and load it into RAM (should take less than 1-3 seconds). If you have a powerful CPU, then this process will be faster as well. At the same time, the compressed program/file will load faster in the RAM as it has a smaller size now.
Therefore, if you have a strong CPU but slower storage device (preferably hard drive), then the compression may speed up opening time. However, if it’s the other way around, then it may take an extra second or two to open a file.
Like I said before, you can either compress specific folders or the whole drive, but I will not recommend you to compress the whole system drive. As C drive also contains system files (Windows), it may inversely affect the performance of Windows. So it’s better to only compress specific data inside it. Of course, you can compress other drives that don’t have an operating system inside.
To compress a folder/drive, right-click on it and select Properties. Under the General tab, click on the Advanced button and then check the checkbox next to Compress contents to save disk space.
- Now click on OK and Apply the settings. You will be asked whether all the contents of the folder should be changed or only the selected folder.
- Here select Apply changes to this folder, subfolders, and files.
Depending on the size of data, it may take few minutes to compress all the data (may take hours for full drive compression).
The folder color will turn blue indicating it is compressed. If you see any performance decrease that you are not comfortable with, then go through the same process again and uncheck the option Compress contents to save disk space to decompress the folder.
In my case, I decreased the size of my Program Files folder from 1GB to 744MB without any noticeable loss in performance. That’s almost 250MB of free space. However, your mileage may vary as it still depends on the content type and whether it is already compressed or not.
Continue reading the entire original article over at Hongkiat.com.