The Windows operating system is several gigabytes in size. While that might not seem all that large by today’s standards, Windows is increasingly being installed on tablets and other lower-cost devices equipped with relatively small amounts of storage space. In addition, more and more organizations are deploying Windows on virtual desktops as it becomes increasingly clear that users aren’t going back to the office any time soon. No matter the endpoint, it can be beneficial to shrink the operating system to save space for other things.
For those who find themselves needing to free up some space on the C: drive, Disk Cleanup is often the go-to mechanism. Disk Cleanup is designed to free up space by removing temporary internet files, downloaded program files, and so on. Although Disk Cleanup can usually reclaim some disk space, these gains tend to be temporary at best. Thankfully, there are some other things you can do that tend to be less transient and will usually provide bigger storage space gains. Here are four things you can do to “buy” extra space.
1. Disable hibernation.
One of the most effective things that you can do to reclaim disk space from Windows is to disable hibernation. Hibernation is a feature that is designed to help Windows to boot more quickly, similar to the Sleep feature. However, there is a big difference between the two. Whereas the Sleep feature simply puts Windows into a low-power state, the hibernation feature writes the computer’s current state to disk. When the computer boots up, Windows reads the hibernation file and puts everything back the way that it was at the time of hibernation. The problem with this, of course, is that hibernation can consume several gigabytes of hard disk space.
To disable hibernation, just open an elevated Command Prompt window and enter the following command:
PowerCfg Hibernate Off
This is the command used to disable Windows hibernation.
2. Disable virtual memory.
Another way that you may be able to save a significant amount of space on a machine C: drive is to disable the Windows pagefile. The Windows pagefile is a leftover from the days of Windows 3.x. At that time, RAM was extremely costly, and the pagefile allowed Windows to make up for inadequate RAM by treating a portion of the machine’s hard disk (the pagefile) as though it were RAM.
The Windows pagefile still exists, and it can still be used to extend available RAM. Being that RAM is much more plentiful than it once was, however, RAM extension has become the pagefile’s secondary purpose. The main reason why the pagefile exists today is that it is where Windows stores crash dump data. If you don’t need to make up for a RAM shortage and you don’t care about analyzing a crash dump, then you can disable the pagefile.
To disable the pagefile, right click on the Windows 10 Start button and select the System command. When the System properties sheet appears, click the About tab and then click the System Info link. Next, click on Advanced System Settings, and then click on the Settings button found in the resulting dialog box’s Performance section. Now, select the Advanced tab and click Change. As you can see in Figure 2, this PC is currently using 1,280 MB of disk space for pagefile storage. That’s space that can be reclaimed.
This PC is using 1,280 MB of disk space for pagefile storage.
3. Compress windows.
Compressing Windows is a far less commonly used technique than the others I’ve mentioned, but it can be just as effective. It works by compressing the various Windows system files, as well as application binaries.
It is worth noting that while compression has the potential to free up a lot of storage space, the compression process can take a long time to complete. Additionally, you may find that your PC runs a bit more slowly after it has been compressed due to the overhead involved in reading compressed files. My advice is to back up your computer before enabling compression. If you find that compression is not working out the way that you had hoped, then you can always restore the backup.
If you want to compress Windows, open an elevated Command Prompt window and enter the following command:
This command will tell you whether the operating system has already been compressed. The system shown in Figure 3, for example, has not yet been compacted and currently has 65.8 GB of space remaining on its C: drive.
This screen capture was taken before Windows was compacted.
To compact Windows, use the following command:
As you can see in Figure 4, compacting the operating system achieved a compression ratio of 1.8-to-1. The remaining storage went from 65.8 GB to 71 GB, meaning that Windows was able to reclaim 5.2 GB of space.
Windows saved over 5 GB of disk space.