- CompactOS compresses system binaries and can be hot-activated with compact.exe.
- DISM allows you to deploy Windows in compact mode and optimize images.
- Stable performance on modern equipment; measuring real-world scenarios is key.
- Combined with cleaning, hibernation and adjusted FOD/LP, it maximizes savings.
If you are concerned about free space on your PC, CompactOS is one of the most effective weapons for recover gigabytes in Windows without reinstalling or losing your data. This technology compresses system binaries so Windows runs directly from compressed files, with minimal performance impact on modern computers and, in many cases, with improvements by reducing disk reads.
In addition to CompactOS itself, Windows includes Deployment and servicing tools (DISM, Windows ADK, Windows PE), as well as advanced options such as single-instantiation of provisioning packages and image optimization. Below, you'll see how to view, activate, or integrate it into clean installations, along with sizing, performance, and best practices considerations.
What is CompactOS and why is it important?
CompactOS allows you to Windows runs from compressed system files, reducing disk space without affecting your documents. It is compatible with computers BIOS and UEFI, can be hot-enabled or hot-disabled, and Windows Update can replace individual files while keeping the size stable There.
On devices with storage limited, The advantage is clear: you save several gigabytes immediately.. On disks SSD slow or eMMC, compression reduces reads, which can balance the CPU cost of decompression and maintain smooth performance.
CompactOS coexists with other surface reduction techniques such as single instantiation of provisioning packages (.ppkg), cleaning up image components, or adjusting hibernation and paging file settings. It all helps when the goal is to optimize the footprint.
Common support areas: Windows 10 and Windows 11 (included IoT Enterprise and LTSC 2021)Activation can be performed during deployment or later on production equipment.
Check, enable, or disable CompactOS on an already installed system
To check the status from a symbol of the system With administrator privileges, you can use compact.exe. This is the fastest way to find out if the system is already in compact mode.
compact /compactos:query
If you want additional output with compression ratio, use compact.exe /q to see the overall ratio; if the value is around 1.0, it is probably CompactOS is not active.
compact.exe /q
To permanently enable CompactOS, run with administrator permissions: It is a process that can take several minutes; do not turn off the equipment during operation.
compact /compactos:always
If you prefer to return to normal mode, the command to disable it is straightforward, keeping in mind that unzipping the entire system also takes time:
compact /compactos:never
In recovery environments (WinPE) you can also check the status by pointing to the Windows folder of the installed system, for example E:\Windows:
compact.exe /compactos:query /windir:E:\Windows
Safety Tip: To avoid problems, make a backup before compressing or decompressing the system. A power outage in the middle of the process is the greatest potential risk.
Clean install or deploy with CompactOS already integrated
If you are deploying Windows from scratch, you can apply the image in compact mode with DISM, saving space from minute oneThis is useful in production and on devices with limited storage.
With DISM applying a WIM in compact mode
- Start the target computer with Windows PE (based on Windows 10 or later).
- Create a paging file 256 MB on the Windows partition for WinPE:
wpeutil createpagefile C:\pagefile /size=256
- Prepare and format partitions and apply the image with the modifier /compact To enable CompactOS during deployment:
DISM /Apply-Image /ImageFile:install.wim /Index:1 /ApplyDir:D:\ /compact
If you are inside the standard installer, in the partitioning step you can open console with Shift+F10 and apply the image manually with DISM. When finished, it generates the files Boot bcdboot pointing to the partition where you applied Windows:
bcdboot F:\Windows
From the Windows installer using unattend
Another way to automate is to use a response file and set it to Microsoft-Windows-Setup\ImageInstall\OSImage\Compact the value True. Thus, the system will be installed already compact without any further intervention.
Single instantiation of provisioning packages (.ppkg)
Beyond the system, Windows allows Run pre-installed desktop applications directly from a compressed provisioning package eliminating duplicates, which further reduces the disk footprint.
Although it works on both SSD and HDD, Microsoft recommends using it on SSD for performanceThe command to apply a .ppkg package in single-instance mode is:
DISM /Apply-CustomDataImage /CustomDataImage:C:\Recovery\Customizations\USMT.ppkg /ImagePath:C:\ /SingleInstance
To check if there are uniquely instantiated provisioning packages on a unit, use fsutil.exe:
fsutil.exe wim enumwims C:
If there is a single instance .ppkg, will appear listedOtherwise, you will see an error indicating that the specified file was not found.
Image Optimization with DISM: Cleanup and Export
After applying updates to an offline image, it is advisable Clean up components, consolidate, and export to a new WIMThis reduces size and facilitates lighter deployments.
md C:\mount\Windows
md C:\mount\temp
Dism /Mount-Image /ImageFile:C:\Images\install.wim /Index:1 /MountDir:C:\mount\Windows
Dism /Cleanup-Image /Image=C:\mount\Windows /StartComponentCleanup /ResetBase /ScratchDir:C:\mount\temp
Dism /Unmount-Image /MountDir:C:\mount\Windows /Commit
Dism /Export-Image /SourceImageFile:C:\Images\install.wim /SourceIndex:1 /DestinationImageFile:C:\Images\install_cleaned.wim
In factories, yes /ResetBase takes more than 30 minutes, you can postpone with /Defer to run heavy cleaning during the next automatic maintenance. Use it only in that scenario.
Size Requirements and Growth Considerations
Even with CompactOS, you must meet minimum requirements of hardware: disk capacity, RAM and workspace for maintenance8GB drives aren't viable; system usage increases with use.
Growth over time is explained by factors such as maintenance of updates (temporary space needed), the restore points (proportional to the disk size and adjustable from System Protection) and the logs and caches that Windows is generating.
RAM, paging file, and hibernation
The files pagefile.sys and hiberfil.sys scale with RAMOn computers with 1GB of RAM, the footprint is smaller than if you upgrade to 4GB or 8GB. You can save space by reducing or disabling hibernation; see optimize it in Windows 11 to adjust these files to your needs.
powercfg /h /type reduced
powercfg /h off
The pagefile size can adjust or move to another partition if you need to free up the system drive, with the usual performance implications.
Language packs and FOD
Install several language packs (LP) increases the size by the associated resources of apps UWP and FOD. Although unused languages are removed after OOBE, preloaded resources can remain. Install only the essential languages to avoid waste.
Remember that the Features on Demand (FOD) They come in compressed CAB format, but they take up more space when installed. With DISM you can see download and installation sizes using /Get-CapabilityInfo.
Optional features
Disable Windows features you don't use save space. You can do this with DISM or PowerShell and re-enable them when you need them, depending on your scenario.
Size comparison with CompactOS, instantiation and hibernation
On Windows 10 (v.1607) for reference, these are Typical savings on x86 with 2 GB and x64 with 4 GBExact values vary with newer versions and component selection.
Image | Windows 10 Home x86, 2 GB | Windows 10 Home x64, 4 GB |
---|---|---|
base surface | 11,68 GB | 15,06 GB |
Compact operating system, no single instances | 8,85 GB (>2,75 GB savings) | 11,3 GB (>3,7 GB) |
Compact, single-instance operating system | 7,66 GB (>4 GB) | 10,09 GB (>4,75 GB) |
Hiberfile disabled, no CompactOS | 10,87 GB (>825 MB) | 13,48 GB (>1,5 GB) |
Reduced Hiberfile, without CompactOS | 11,27 GB (>400 MB) | 14,15 GB (>930 MB) |
In well-tuned compact installations, It is usual to recover between 2 and 4+ GB, depending on architecture, RAM and feature selection.
Performance Impact: What to Expect
The default algorithm is optimized for common casesOn computers with modern CPUs and SSDs, you shouldn't notice a significant drop. Compression results in fewer disk reads and more CPU decompression; if the bottleneck was in storage, the result may be neutral or even positive.
To evaluate your case, you can use Windows ADK (Assessment Toolkit and Performance Toolkit) and tools like diskspd to measure I/O and CPU load during reads. Testing real-world scenarios (booting, launching key apps) will give you the exact picture.
CompactOS and UWF: Correct order to avoid surprises
If you use Unified Write Filter (UWF), remember that it redirects writes to a volatile overlay. Enable or disable CompactOS with UWF active will fill the overlay and changes will be lost upon restart, reversing the state.
- During implementation, Enable CompactOS before activating UWF.
- To change the CompactOS state later, disable UWF first, change CompactOS and re-enable UWF.
- For specific adjustments to already deployed equipment, use UWF maintenance mode.
More file compression options
CompactOS compresses the system and certain selected program binaries. To own read-only programs, you can force optimized compression for executables with:
compact.exe /C /S:'c:\Program Files (x86)\tu\carpeta\de\programa' /EXE:XPRESS8K *.dll
For writable files, consider the compression NTFS cuisine with compact.exe without the /EXE option. Note that its performance overhead is higher than CompactOS or /EXE.
compact.exe /C /S:'c:\Program Files (x86)\tu\carpeta\de\programa' *patron*editable*
Other ways to free up space besides CompactOS
If you need to scratch out more gigabytes, Windows brings utilities that, together with CompactOS, maximize free space without resorting to third-party tools.
Disk Cleanup
It is the safest native option to delete temporary, installation files and elements that are no longer needed. Run cleanmgr, select the drive, and select the categories you want to delete; repeat with "Clean up system files" to cover as many as possible.
Uninstall or move applications
Remove apps and games that you don't use or move to another partition with the Windows 10/11 feature to change the installation location, reducing the pressure on the system drive.
Recycle Bin, Pagefile, and Restore Points
Adjust the size of the Recycle Bin, reduce or move the paging file and limits the space dedicated to System protection so that it does not grow out of control.
Hibernation and external storage
Disabling or reducing hibernation frees up several gigabytes, as you saw earlier. Also, on computers that support it, move your personal data to SD or USB to keep C drive in check.
Storage sensor
Activate Storage sensor to automatically clean up temporary and non-essential local content when space is low, keeping your system leaner without manual intervention.
Risks, good practices and solutions that should not be forced
The biggest risk of CompactOS is a sudden blackout during compression/decompression. Avoid this by connecting the equipment to power and, if possible, to a UPS. Make a backup beforehand; if something goes wrong, you can always revert with compact / compact: never.
Deleting the recovery partition can free up a lot of space, but you lose a rescue route in case of failures. If you decide to do so, create recovery media and make sure you have verified backups.
Keep in mind that Some 8GB drives are not operational Even if you compress everything, the maintenance footprint and the natural growth of the system and apps will eventually overwhelm them.
CompactOS is a powerful lever for gaining space in Windows, and its success is increased by combining it with optimized image, single-instantiation provisioning, hibernation tweaks, and periodic maintenance; If you measure performance, follow the correct order with UWF and respect the precautions, you will get a lighter system without sacrificing stability.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.