Compress Windows itself with Compact OS — via Microsoft Learn
Compact OS stores the Windows system files compressed, freeing a few gigabytes on small drives. You can check its state and switch it on or off at any time with one command. Microsoft recommends it only on flash (SSD/eMMC) storage.
Takes effect right away
Command
Run in an administrator Command Prompt / Terminal window.
compact /compactos:query
compact /compactos:alwaysUndo
compact /compactos:neverCompressing or uncompressing takes a while. Windows Update keeps working normally on a compacted system.
Sources
- compact (command reference) — by Microsoft Learn
- Compact OS, single-instancing, and image optimization — by Microsoft Learn
- Push-button reset FAQ — When should I use Compact OS? — by Microsoft Learn
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.