How to Turn On or off Compact OS in Windows 11
Compact OS in Windows 11 compresses the core operating system files to free up roughly 2 GB of storage. It works best on small solid-state drives, and on most modern PCs you won’t notice any slowdown. On older hardware or a slow processor, expect a small performance cost.
You can turn Compact OS on or off from Windows Terminal whenever you run low on room for apps and games. The feature is part of Windows 11 itself, so it works the same on Home and Pro. Some devices with limited storage already have it switched on from the factory, so check the current status first.
Open Windows Terminal as administrator, paste compact /compactos:query and press Enter to check the current status. To turn Compact OS on, run compact /compactos:always. To turn it off, run compact /compactos:never. Wait several minutes for the operation to finish.
Important Things to Know
- Admin privileges required — You must be signed in with an administrator account. On a standard account, Windows asks for an administrator’s password when you open Terminal as administrator. If you don’t have one, you can’t change this setting.
- Patience — Windows needs a few minutes to compress or uncompress the files. Don’t shut down or restart the PC while it works, and don’t close the window until the command finishes.
- Save your work — The operation can slow the PC down while it runs, so close anything important first.
Step 1Check if Compact OS is On or Off
Before changing anything, find out whether Compact OS is already on. You do this with one query command in an elevated Windows Terminal. The query only reads the current state and changes nothing.
- Click the Start button.
- Type Windows Terminal. It should appear at the top of the search results.
- Right-click it and choose Run as administrator. ⚠️ Admin privileges required
- If a User Account Control prompt appears, click Yes. A Terminal window opens, usually with a PowerShell tab. The command also works in a Command Prompt tab.
- Copy and paste this command, then press Enter:
compact /compactos:query - Read the message that appears. The exact wording can vary slightly between builds, but it should match one of these:
- If it says “Compact OS is enabled.” — it’s turned on.
- If it says “Compact OS is disabled.” — it’s turned off.
- Close Windows Terminal when you’re done.
Close it and repeat steps 1 to 3.

Once you know the current state, you can move on to turning Compact OS on or off.
Step 2How to Turn On Compact OS
Turning Compact OS on compresses the system files Windows uses to run, which frees up disk space. You open Windows Terminal as administrator, run the activation command, and wait while Windows shrinks the files. You don’t need to restart the PC afterward.
If you checked the status first and it already says enabled, you don't need to do anything here.
- Open Windows Terminal as an administrator, using steps 1 to 4 from the status check above. ⚠️ Admin privileges required
- Copy and paste this command, then press Enter:
compact /compactos:always - Wait while Windows compresses your files. This may take several minutes, and the window may show no progress for a while. That's normal, so let it finish and return to the prompt.
- Close the window when the command has finished.
- Run the status command from the previous section to confirm that Compact OS now reports as enabled. Free space may take a moment to update in Settings.
Step 3How to Turn Off Compact OS
Make sure the drive has enough free space first, because the files grow back by roughly the 2 GB you saved. Open Windows Terminal as administrator, run the deactivation command, and give Windows a few minutes to rewrite the data. This is also how you undo the change if you turned Compact OS on and don't like the result.
- Open Windows Terminal as an administrator. ⚠️ Admin privileges required
- Copy and paste this command, then press Enter:
compact /compactos:never - Wait while Windows uncompresses the files. Windows rewrites the data for every file, so this can take several minutes.
- Close the window when the command has finished.
- Run the status command again to confirm that Compact OS now reports as disabled.
Summary
- You must have administrator access to use Compact OS.
- Compact OS saves disk space by squeezing Windows system files smaller, roughly 2 GB in most cases.
- Use these commands in an elevated Windows Terminal:
- Check status:
compact /compactos:query - Turn on:
compact /compactos:always - Turn off:
compact /compactos:never
- Check status:
- Be patient, because compressing or decompressing files takes several minutes. Don't interrupt it.
- Always check the status after running a command to verify the outcome.
Compact OS is a built-in Windows 11 feature that saves drive space by shrinking system files, and you control it with a few Windows Terminal commands. You can check your current status, turn compression on, or turn it off whenever your storage needs change.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!