Skip to content

Compress Windows itself with Compact OS — via Microsoft Learn

Commandlow riskNeeds adminWindows 11Windows 10

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:always

Undo

compact /compactos:never
Compressing or uncompressing takes a while. Windows Update keeps working normally on a compacted system.

Sources

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.

compact oscompressiondisk spacessd

More in Performance & Power

Check memory pressure, not 'free RAM' — via Apple Support

Tricklow risk

A Mac that shows almost no free memory is usually fine: macOS keeps recently used files cached in RAM so apps reopen faster. The number that matters is the Memory Pressure graph in Activity Monitor, which combines free memory, swap and cached files.