close
close

How to reduce the size of Windows on devices with minimal storage space

The Windows operating system is several gigabytes. While this may not seem like that big of a deal by today’s standards, Windows is increasingly being installed on tablets and other cheaper devices with relatively little disk space. Additionally, more organizations are adopting Windows on virtual desktops as it becomes increasingly clear that users won’t be returning to the office any time soon. Regardless of the endpoint, it may be beneficial to downsize the operating system save space for other things.

For those who need to free up some space on their C: drive, Disk cleanup is often an effective mechanism. Disk cleanup aims to free up space by removing temporary internet files, downloaded program files, and so on. Although Disk Cleanup usually allows you to regain some disk space, these benefits are temporary at best. Fortunately, there are a few other things you can do that are less transient and usually provide better results storage space profits. Here are four things you can do to “buy” extra space.

1. Disable hibernation.

One of the most effective things you can do to regain disk space in Windows is to disable hibernation. Hibernation is a feature intended to help Windows start faster, similar to the sleep feature. However, there is a big difference between them. While the sleep function simply puts Windows into sleep mode low power state, the hibernation feature saves the current state of the computer to disk. When you start your computer, Windows reads the hibernation file and restores everything to its pre-hibernation state. The problem, of course, is that hibernation can take up several gigabytes of hard drive space.

To disable hibernation, simply open an elevated Command Prompt window and enter the following command:

PowerCfg Hibernate Off

Save space 1.jpg

Save space 1

Figure 1

This command is used to disable Windows hibernation.

2. Disable virtual memory.

Another way to save a significant amount of space on your computer’s C: drive is to disable the Windows paging file. The Windows paging file is a holdover from the days of Windows 3.x. At the time, RAM was extremely expensive, and the paging file allowed Windows to make up for the lack of RAM by treating part of the computer’s hard drive (the paging file) as if it were RAM.

The Windows paging file still exists and can still be used to expand available RAM. However, since there is much more RAM than there used to be, expanding RAM has become a secondary purpose of the paging file. The main reason for the paging file is that it is where Windows stores crash dump data. If you don’t need to top up RAM and don’t care about crash dump analysis, you can disable the paging file.

To disable the paging file, right-click the Windows 10 Start button and select System. When the System Properties sheet appears, click the Information tab, and then click the System Information link. Then click on Advanced System Settings and then click on the Settings button located in the Performance section of the dialog box. Now select the Advanced tab and click Change. As you can see in Figure 2, this computer is currently using 1280 MB of disk space to store paging files. This is space that can be reclaimed.

Save space 2.jpg

Save space 2

Figure 2

This computer uses 1280 MB of disk space to store paging files.

3. Compress windows.

Windows compression is a much less commonly used technique than the others I’ve mentioned, but it can be just as effective. It works by compressing various Windows system files as well as application binaries.

It’s worth noting that although compression can free up a lot of disk space, the compression process can take a long time. Additionally, you may find that your computer runs slightly slower after compressing due to the overhead of reading the compressed files. I advise you to back up your computer before enabling compression. If you find that compression isn’t working as expected, you can always restore a backup.

If you want to compress Windows, open an elevated Command Prompt window and enter the following command:

Compact /CompactOS:query

This command will tell you whether the operating system has already been compressed. For example, the system shown in Figure 3 has not yet been compacted and currently has 65.8 GB of space left on the C: drive.

Save space 3.jpg

Save space 3

Figure 3

This screenshot was taken before Windows was compacted.

To compact Windows, use the following command:

Compact /CompactOS:Always

As you can see in Figure 4, after compacting the operating system, a compression ratio of 1.8 to 1 was achieved. The remaining memory increased from 65.8 GB to 71 GB, which means that Windows was able to reclaim 5.2 GB of space.

Save space 4.jpg

Save space 4

Figure 4

Windows saved over 5 GB of disk space.