Skip to main content

How to reduce the size of Windows 10's footprint on your PC

Alongside many new features and changes, Windows 10 also includes additional improvements that are often overlooked because they are implemented under the hood. For example, if you haven't noticed, the installation now takes far less space than previous versions, which enables it to run on devices with smaller storage capacities.

Microsoft even made changes to the recovery process to eliminate the use of a recovery image. Instead, if you ever need to reset your device, the OS will use the files already stored in the winsxs folder. Using this method, users can get around 4GB of space back.

While they all are welcomed improvements your device will take advantage without additional configuration, you may need to reduce the drive usage even more, and this is when "Compact OS" comes in handy.

Compact OS is a new mechanism that compresses all the installation files and preinstalled applications, letting you run Windows 10 from a compressed environment, reducing the footprint and freeing up space.

In this Windows 10 guide, we walk you through the steps to use the Compact OS command-line tool to shrink the Windows footprint size to save space on your device.

How to use Compact OS to reduce the size of Windows 10

Compact OS technically is a replacement for WIMBoot which offered similar advantages. You can still use it, but the new mechanism is a lot easier to set up and deploy.

It's worth noting that this guide focuses on using Compact OS on a computer already running Windows 10, but you can also use this tool to deploy a compressed installation of Windows 10 on new devices.

Warning: While the process is safe, you'll be making system changes, and there is always a chance something will go wrong. We recommend making a full backup of your PC before proceeding.

Ready? Follow these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the result, and select Run as administrator.
  3. Type the following command to verify that your system is not already compressed and press Enter:Compact.exe /CompactOS:query
  4. Type the following command to reduce the size of Windows 10 and apps and press Enter:Compact.exe /CompactOS:always

Once you completed these steps, Compact OS will begin the compression process, which could take up to 20 minutes.

Over time, the footprint of Windows 10 will be kept small, thanks to the system being able to interact with the original files directly to remove or replace them as required, unlike WIMBoot, which combines files into a single WIM file.

You can always revert the changes using the same instructions, but on step No. 4, use this command Compact.exe /CompactOS:never and press Enter.

Reducing the Windows footprint even more

Although using Compact OS can free up additional space, you should also consider that the pagefile.sys (virtual memory) and hiberfil.sys (hibernation data) can increase in size of the footprint even more, depending on the amount of memory in your device.

For example, if you have a tablet with a small storage capacity, and it's limited to 1GB of memory, the system files will use less space than on a device with more than 1GB of memory.

In order to save extra space to reduce the overall size of Windows 10, you can remove or reduce the size of the hiberfil.sys file. Here's how:

  1. Open Start.
  2. Search for Command Prompt, right-click the result, and select Run as administrator.
  3. Type the following command to make Hiberfil.sys smaller and press Enter:powercfg /h /type reduced

The above command reduces the size of the hibernation file by 30 percent. If you want to remove the file completely, you can use the

powercfg /h /off

command instead.

If you want to change the hibernation settings back to the full amount, simply follow the same instructions, but on step No. 3, make sure to use this command

powercfg /h /size 100


Using this method, you'll be able to reclaim around 3GB of space and an additional 30 percent of the hiberfil.sys file.

While you can use Compact OS on any device, this is a feature designed to make the system files lighter on a low-cost device with limited storage. Also, using this method shouldn't affect system performance noticeably.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

Mauro Huculak is technical writer for His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • Compacting OS gave me an additional 2GB free storage. Good because I use an 64GB mSata SSD as an replacement of HDD on an old Dell D430. Combined with an 32GB SD card where I keep all my docs, music, video and OneDrive I still have 15GB free on SSD which I can keep it free for better performance of SSD. And the old laptop is still a runner compared with entry level of actual laptops.
  • Was performance impacted? I have a SP so has an SSD.
  • This is what I would like to know as well.
  • "The system is not in the Compact state because Windows has determined that, it is not beneficial for this system."
  • That is what I had, so I do not think I will bother. But still good to know about this.  
  • Any issues with BitLocker?
  • There shouldn't be size issues, just possible performance issues.
  • Very useful article, I never knew about this command. I don't use hibernation nor do I have a pagefile (32GB of installed RAM)
  • Sweet, this should come in handy.
  • Good article. If anyone's interested, Microsoft has info on using Compact with DISM etc. here:
    docs[.]microsoft[.]com/en-us/windows-hardware/manufacture/desktop/compact-os Note that compacting the OS is only recommended if the device uses a SSD or eMMC drive. Getting rid of unused default apps helps -- CCleaner can get rid of those that don't come with an uninstall option. With something like my tablets, moving those Windows User folders, along with apps that allow it to an SD card helps. Installing win32 apps to that SD card helps. For software that doesn't let you install to removable storage [that SD card], Windows sees a mounted VHD as another fixed [rather than removable] drive. I use a task to mount the VHD when Win10 starts. If you really want to push getting the max amount of drive space, you only need 1-2 partitions with win10. If it's GPT bios you need a small FAT32 partition to hold the boot files -- otherwise you can skip it & the small amount of wasted space. [A Windows To Go drive has a MBR disk with a small FAT32 partition for boot files, with everything else going on a NTFS partition.] The Recovery partition can -- IMHO often should -- be deleted, with the Windows system partition enlarged to use the space it took up.
  • Nice article. I look forward to trying this on my tablet, which has had issues with free space in the past, particularly when it comes to big updates.
  • "powercfg /h /type reduced" Whether this command has any performance issue means Performance will be good or else ?????
  • It's only for if you want to use fast startup and don't need to be able to hibernate.
  • And the performance impact if any?
  • I didn't notice any performance issues, but you should only consider using this feature if you need to.
  • Continuing my comment: I have no performance issues after compacting windows 10.
  • Should I use it on Dell laptop