Windows 10: Compress or Uncompress Windows 10 with Compact OS  

Page 1 of 2 12 LastLast
    Compress or Uncompress Windows 10 with Compact OS

    Compress or Uncompress Windows 10 with Compact OS

    How Compress or Uncompress Windows 10 with Compact OS
    Published by Category: General Tips
    31 Mar 2017
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 22,875

    Show Printable Version 


    How Compress or Uncompress Windows 10 with Compact OS

    information   Information
    Windows 10 includes tools to help you use less drive space. You can now compress the files for the entire operating system, including your preloaded desktop applications. Compact OS lets you run the operating system from compressed files (similar to WIMBoot in Windows 8.1 Update 1), and single-instancing helps you run your pre-loaded Windows desktop applications in compressed files. The new processes helps maintain a small footprint over time by using individual files, rather than combining them in a WIM file.

    Windows 10 can efficiently compress system files. That gives back approximately 1.5GB of storage for 32-bit and 2.6GB of storage for 64-bit Windows.

    Compact OS is supported on both UEFI-based and BIOS-based Windows 10 installations.

    For more details about Compact OS in Windows 10, see:


    This tutorial will show you how to use Compact OS to manually compress or uncompress your Windows 10 system.

    You must be signed in as an administrator to be able use Compact OS.


    EXAMPLE: Compare free space on Windows drive using Compact OS
    Click image for larger version. 

Name:	Uncompressed.png 
Views:	839 
Size:	58.8 KB 
ID:	36811
    Click image for larger version. 

Name:	Compressed.png 
Views:	492 
Size:	58.2 KB 
ID:	36809



    Here's How:

    1. Open an elevated command prompt.

    2. Do step 3 (query), step 4 (compress), or step 5 (uncompress) below for what you would like to do.


     3. To Query Current System Compact State

    A) Copy and paste the command below into the command prompt, press Enter to see if your Windows 10 is currently in the compact state (compressed), and go to step 4 (compress), step 5 (uncompress), or step 6 below.

    compact /compactos:query

    Click image for larger version. 

Name:	compact_query-1.png 
Views:	382 
Size:	14.8 KB 
ID:	36806
    Click image for larger version. 

Name:	compact_query-2.png 
Views:	286 
Size:	14.7 KB 
ID:	36807


     4. To Compress Windows 10 OS Binaries (system files)

    A) Copy and paste the command below into the command prompt, press Enter, and go to step 6 below.
    Note   Note
    It can take a while to finish compressing.



    compact /compactos:always

    Click image for larger version. 

Name:	compress_command.png 
Views:	430 
Size:	18.7 KB 
ID:	36808


     5. To Uncompress Windows 10 OS Binaries (system files)

    A) Copy and paste the command below into the command prompt, press Enter, and go to step 6 below.
    Note   Note
    It can take a while to finish uncompressing.



    compact /compactos:never

    Name:  uncompress_command.png
Views: 6583
Size:  15.0 KB


    6. When finished, you can close the elevated command prompt if you like.



    That's it,
    Shawn


  1.    10 Sep 2015 #1

    An alternative message you might get from ":query" option is this:
    Name:  compactOSQuery.png
Views: 6537
Size:  8.9 KB

    I'm assuming it would be potentially harmful to performance to switch on compactos if this message comes up.
      My ComputerSystem Spec

  2.    10 Sep 2015 #2

    DavidY said: View Post
    I'm assuming it would be potentially harmful to performance to switch on compactos if this message comes up.
    Maybe, maybe not. When I upgraded my OS was compacted, when I clean installed on same hardware it wasn't. I did an in-place upgrade and it was again.... The exact conditions that the system uses to decide aren't documented that I can see - some combination of RAM/CPU/Free Space/Disk

    You can always try it and turn it off again if it is slower. It may even be faster (slow disk, fast CPU for example) - it depends on your specific set-up..
      My ComputerSystem Spec

  3.    10 Sep 2015 #3

    halasz said: View Post
    Maybe, maybe not. When I upgraded my OS was compacted, when I clean installed on same hardware it wasn't. I did an in-place upgrade and it was again.... The exact conditions that the system uses to decide aren't documented that I can see - some combination of RAM/CPU/Free Space/Disk
    Actually I had the same - I have a tablet which was running 8.1, and when I upgraded, CompactOS was on, but after a clean-install it wasn't.

    In my case I'm assuming it was because the clean-install didn't have the right drivers (I had to add some manually), and my best guess was that the disk didn't look like a solid-state device and that tipped the balance so it decided not to compact.
      My ComputerSystem Spec

  4.    10 Sep 2015 #4

    DavidY said: View Post
    In my case I'm assuming it was because the clean-install didn't have the right drivers (I had to add some manually)
    It could be drivers - I had to add some also - I just assumed free space. Really I don't know though.

    If your interested in saving more space I've also compacted these directories with compact /c /s /a /f /q /i /exe:xpress16k ... I've not seen any performance difference but it saves a lot of space, especially if you have Office...

    Most other big directories I've tried seem to stop Windows booting or otherwise behave badly (programdata, appdata, system32\driverstore\filerepository for example) but these work OK.

    Code:
    $env:programFiles
    $env:programFiles(x86)
    $env:homeDrive\MSOCache
    $env:homeDrive$env:homePath\Documents
    $env:windir\Assembly
    $env:windir\InfusedApps
    $env:windir\Installer
    $env:windir\Panther
    $env:windir\SoftwareDistribution
    $env:windir\System32\Catroot2
    $env:windir\System32\LogFiles
      My ComputerSystem Spec


  5. Posts : 22,875
    64-bit Windows 10 Pro build 16257
    Thread Starter
       10 Sep 2015 #5

    DavidY said: View Post
    An alternative message you might get from ":query" option is this:
    Name:  compactOSQuery.png
Views: 6537
Size:  8.9 KB

    I'm assuming it would be potentially harmful to performance to switch on compactos if this message comes up.
    Yeah, that's pretty much just a generic message basically meaning that Windows determined that you didn't needed to compress.

    It doesn't mean that it will hurt or improve performance.
      My ComputersSystem Spec

  6.    13 Nov 2015 #6

    Thank you for this post ! I decided to try out a super cheap laptop with only 32GB as a travel device. Bad idea. mostly because Windows 10 really needs a 64GB drive if you want to install some standard apps and still have enough room for performance. That said, this device came with the OS compacted. I decided to turn that off and see what the performance is like since task manager showed compression as a major resource sucked. Long story short, uncompressing only cost me 1GB is space. Before that Windows 10 was using 10GB of space. So the net gain on compression was only 10%, not at all worth it. Personally, I would keep the OS uncompressed.
      My ComputerSystem Spec

  7.    13 Nov 2015 #7

    MrBill said: View Post
    I decided to turn that off and see what the performance is like since task manager showed compression as a major resource sucked.
    Did you find any performance difference? In my testing I've found uncompressed to be the slowest even if you have SSD (not that it would always be the case). See this thread for example Any useful scenario for NTFS compression? - Page 2 - Windows 10 Forums
      My ComputerSystem Spec

  8.    17 Nov 2015 #8

    lx07 said: View Post
    It could be drivers - I had to add some also - I just assumed free space. Really I don't know though.

    If your interested in saving more space I've also compacted these directories with compact /c /s /a /f /q /i /exe:xpress16k ... I've not seen any performance difference but it saves a lot of space, especially if you have Office...

    Most other big directories I've tried seem to stop Windows booting or otherwise behave badly (programdata, appdata, system32\driverstore\filerepository for example) but these work OK.

    Code:
    $env:programFiles
    $env:programFiles(x86)
    $env:homeDrive\MSOCache
    $env:homeDrive$env:homePath\Documents
    $env:windir\Assembly
    $env:windir\InfusedApps
    $env:windir\Installer
    $env:windir\Panther
    $env:windir\SoftwareDistribution
    $env:windir\System32\Catroot2
    $env:windir\System32\LogFiles
    Can someone post what the compact switches do that are listed in this post?
      My ComputerSystem Spec


  9. Posts : 22,875
    64-bit Windows 10 Pro build 16257
    Thread Starter
       17 Nov 2015 #9

    Hello Mansome,

    Here you go.

    Click image for larger version. 

Name:	compact-1.png 
Views:	358 
Size:	98.4 KB 
ID:	48937
    Click image for larger version. 

Name:	compact-2.png 
Views:	230 
Size:	47.4 KB 
ID:	48938
      My ComputersSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Source: How Windows 10 achieves its compact footprint
Compact a Hyper-V VHD in Virtualization
I have Hyper-V VM with the Windows 10 Pro Technical Preview Build 9926 as the guest, and Windows 8.1 Pro as the host OS. I've been running it for 3 months now, with at least 2 build updates. But I can't compact the VHD. The used drive space on the...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:29.
Find Us