Although space issues are not common among users these days, given the large capacities of current hard drives, you might be interested in following this tutorial to make better use of the gigabytes your drive offers.
We've seen that Windows 10 performs differently than previous versions. Without going so far as to say it's better or worse, we can say that storage management is different due to the operating system's installation and its built-in features. With these simple steps, we'll show you how to free up to 20 GB of space on your drive quickly and easily.
This guide will be especially beneficial to SSD users , since these drives do not yet have particularly large storage capacities, or to tablet users, where internal storage is also scarce.
What is CompactOS?
To accomplish this, we will use CompactOS , a replacement for WIMBoot, which was used in Windows 8.1 and allowed us to save hard drive space by utilizing the recovery partition . This partition, present on many computers as the first partition on the hard drive and hidden to prevent it from being affected by external actions, allows you to reinstall the operating system completely or in parts in a matter of minutes.
WIMBoot made it possible to utilize the 4GB occupied by the recovery partition and increase the size of the C: drive, which is the one Windows uses by default. However, this feature was exploited by manufacturers to include bloatware programs within their own images —software that overloads the operating system and, in many cases, provides no functionality whatsoever to the user.

With the arrival of Windows 10, the recovery partition was lost, and CompactOS emerged as a solution to save space within the system. Thanks to this feature, it's possible to compress the operating system files into a single file , which Windows 10 can later decompress when it needs to recover something from within.
While WIMBoot didn't actually save any system space, as it simply moved data between partitions, CompactOS can free up several gigabytes of space , albeit at the cost of some performance loss. This will depend primarily on the device's capabilities.
How to recover the space?
CompactOS is a feature that can be enabled or disabled as desired . We can check if it is in use with the following command, always with administrator privileges: Compact /CompactOS:query
If it isn't, we can activate it with the following command: Compact /CompactOS:always
And if, while it's active, we see that the machine's performance degrades significantly or we're simply not happy with the results, we can disable the function using the following command: Compact /CompactOS:never

In both cases, we will have to wait for the system to compress or decompress the files on the computer, so please be patient when running this function on your computers.
Have you already tried this function on your system? What result has it given you? Was it what you expected or is the performance of your device degraded?