Credit: Pankil Shah/MakeUseOf
Published 1 minute ago
Yasir is a Mechanical Engineer who writes about tech at MUO, covering Windows, Productivity, Security, and the Internet. His interest in autonomous systems keeps him constantly tinkering with both hardware and software.
His tech writing journey began during his junior year of engineering, leading him to Android Police before joining MUO. He focuses on making technology accessible, whether he’s troubleshooting Windows issues, exploring productivity tools, or explaining security risks in plain English. For Yasir, the best way to do this is to actually use the tools and run into the same problems readers face.
When he’s not writing or engineering, you’ll find Yasir watching Impractica…
Credit: Pankil Shah/MakeUseOf
Published 1 minute ago
Yasir is a Mechanical Engineer who writes about tech at MUO, covering Windows, Productivity, Security, and the Internet. His interest in autonomous systems keeps him constantly tinkering with both hardware and software.
His tech writing journey began during his junior year of engineering, leading him to Android Police before joining MUO. He focuses on making technology accessible, whether he’s troubleshooting Windows issues, exploring productivity tools, or explaining security risks in plain English. For Yasir, the best way to do this is to actually use the tools and run into the same problems readers face.
When he’s not writing or engineering, you’ll find Yasir watching Impractical Jokers and genuinely laughing at pranks he’s seen a dozen times before.
Storage space on Windows has a way of disappearing when you least expect it. Your drive fills up faster than you’d expect, thanks to system files, app caches, and updates. I’ve tried the usual cleanup methods, including Windows 11’s built-in storage tools, clearing temp files, and uninstalling apps I forgot existed, but they only go so far.
I came across CompactOS, a built-in Windows feature that compresses the operating system itself. With one command in the Command Prompt and a few minutes of waiting, I had 11GB back on my SSD without deleting a single personal file. If you’re running low on space and want a quick win, here’s how CompactOS works and whether it’s right for your PC.
What is CompactOS?
A compression method built specifically for Windows system files
CompactOS is a Windows feature that compresses the operating system’s core files, such as binaries, system libraries, and other components. Instead of storing these files in their full size, Windows keeps them compressed and decompresses them on the fly when needed. The result is a smaller OS footprint without removing anything.
Microsoft designed CompactOS initially for devices with limited storage, like budget laptops and tablets that ship with smaller drives. On these machines, every gigabyte matters, so running a compressed OS makes sense out of the box. CompactOS works just as well on regular PCs and laptops. Modern processors handle the decompression so efficiently that you won’t notice a performance difference in daily use. The CPU overhead is minimal, and since SSDs are fast anyway, the slight delay from decompression is negligible.
You might ask how this differs from NTFS compression, which you can enable on any folder. NTFS compression is a general-purpose tool that works on any file, but it’s not optimized for system files. CompactOS, on the other hand, uses a method specifically tuned for Windows binaries. It’s more efficient and doesn’t introduce the same risks of file corruption or slowdowns.
The feature has existed since Windows 10, yet Microsoft doesn’t advertise it in Settings or promote it as a storage-saving option. You even have to dig into the Command Prompt to check whether it’s enabled, which is likely why it flies under the radar.
Running the command to reclaim your storage space
Check your current compression status first
Before you run the command to shrink your files, it’s a good idea to see if Windows has already enabled this feature automatically. Some PCs, especially those with smaller drives, come with compression enabled by default. There’s no point running the command if Windows is already compressed.
To check your current status:
- Press Windows + S and type cmd.
- Right-click **Command Prompt **and select Run as administrator.
- Type **compact /compactos:query **and press Enter.
Windows will tell you whether the system is running in a compressed state. If it says "The system is not in the Compact state," you’re good to proceed. If compression is already active, you won’t gain anything by running it again.
Now for the actual compression. In the same Command Prompt window, run the following:
- Type **compact /compactos:always **and press Enter.
- Wait for the process to complete.
That’s it. You don’t need to restart or confirm anything. Windows will start compressing system files immediately, but it doesn’t show you the progress as it works through each one. The process time varies depending on your drive speed and CPU. On my laptop, it took about 23 minutes and freed up 11GB of space.
Once it’s done, you’ll see a summary showing how many files were compressed and the total space saved. Your computer will continue running normally — the compression happens in the background. However, if you change your mind later or notice any issues, reverting is just as simple. Open Command Prompt as administrator again and run the opposite command:
- Type **compact /compactos:never **and press Enter.
- Wait for Windows to decompress the system files.
The process takes roughly the same amount of time as compression. Once it finishes, your system returns to its original uncompressed state, and you’ll have the same storage footprint as before.
When you should avoid using CompactOS
The CPU overhead isn’t worth it for everyone
CompactOS isn’t for everyone. While the performance impact is minimal on most systems, there are scenarios where enabling it doesn’t make sense — or could introduce subtle slowdowns you’d rather avoid.
The main consideration is your CPU. Every time Windows accesses a compressed system file, your processor has to decompress it. Modern multi-core CPUs handle this effortlessly, and the overhead is so small you’d never notice. But older or underpowered processors might struggle with the extra workload. If your PC already feels sluggish during basic tasks, adding decompression overhead won’t help. The performance dip would be slight, but on a system that’s already straining, every bit counts.
Storage size matters too. The space saved is more beneficial for a 128GB or 256GB drive. On a 1TB SSD, though, that same saving represents just a percent of your total capacity. The trade-off, however small, stops making sense when you have plenty of room to spare.
The ideal candidate for CompactOS is someone who wants to get more performance from an NVMe SSD, a reasonably capable processor, and genuine storage constraints. If you’re constantly juggling files, then those few gigabytes matter. If you’re sitting on 500GB of free space, they don’t.
There’s also the question of workload. Systems running heavy applications, such as video editing software, virtual machines, and large development environments, frequently access system files. The decompression overhead, while negligible for everyday use, could compound during intensive tasks. It’s unlikely to cause problems, but it’s worth considering if you push your hardware regularly.
A few gigabytes go a long way
Other ways to slim down your Windows installation
CompactOS is one piece of the puzzle. If you’re still tight on space, consider disabling hibernation with **powercfg /hibernate off **to reclaim several more gigabytes. Clearing out old Windows Update files through Disk Cleanup helps too — just select **Windows Update Cleanup **under system files.
If you’re running dual-boot setups or virtual machines, every gigabyte saved on the main OS means more room for what actually matters. Minor optimizations add up, especially on drives where space is already at a premium.