Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    iNET Interactive
    Join Date
    Jan 2011
    Location
    Seattle, WA
    Posts
    738
    Thanks
    11
    Thanked 72 Times in 57 Posts

    Shrink that gigantic WinSxS folder down to size




    LANGALIST PLUS

    Shrink that gigantic WinSxS folder down to size


    By Fred Langa

    With its voracious appetite for disk space, WinSxS can be a problem for users of solid-state and other relatively small drives.
    Fortunately, Win7's little-known Deployment Image Servicing and Management tool can help regain gigabytes of space.


    The full text of this column is posted at windowssecrets.com/langalist-plus/shrink-that-gigantic-winsxs-folder-down-to-size/ (paid content, opens in a new window/tab).

    Columnists typically cannot reply to comments here, but do incorporate the best tips into future columns.

  2. The Following 2 Users Say Thank You to Kathleen Atkins For This Useful Post:

    TeRmInAlCrAzY (2012-04-05),tomse3 (2012-04-05)

  3. #2
    New Lounger
    Join Date
    Dec 2009
    Location
    Ireland
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Woohoo!

    "When Windows’ app installer misbehaves" fixed my problems installing the latest Java update!

    Thanks!

  4. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    2,855
    Thanks
    19
    Thanked 110 Times in 104 Posts
    It's a pity more research wasn't done into the use of DISM, for those people running a 64-bit operating system get with
    C:\Windows\System32\DISM /online /Cleanup-Image /SpSuperseded
    the messages:
    Error: 11
    You cannot service a running 64-bit operating system with a 32-bit version of DISM.
    Please use the version of DISM that corresponds to your computer’s architecture.

    The trick is to use the 64-bit version of DISM, via
    C:\Windows\sysnative\DISM /online /Cleanup-Image /SpSuperseded


    My WinSXS folder went from 12,800 MB to 7.802 MB, in about 10 minutes.
    BATcher

    Dear Diary, today the Hundred Years War started ...

  5. #4
    Star Lounger
    Join Date
    Dec 2009
    Location
    Kennesaw, GA
    Posts
    56
    Thanks
    2
    Thanked 1 Time in 1 Post
    I have a win7 x64 and followed the instructions exactly as written in the column. Even cut and pasted the command line so no typos etc. Works just fine no error messages.
    Went from almost 15000 files to just under 11000 files and from 24+ Gb to 7.4 GB. BIG BIG difference. I did not time it, but it did run for quite awhile and I read email and online forums while it was running and did not notice any impact.

  6. #5
    2 Star Lounger
    Join Date
    Nov 2011
    Location
    Berkshire, UK
    Posts
    128
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Eventually got this to work, cutting WinSxS folder from 11.4gb to 7.4gb. But Fred, your command line wasn't clear that you had to leave a space before each back slash. I kept getting error message until I used dism.EXE and put in those spaces - btw, it wasn't case sensitive. (My machine would not let me paste into the command window). Also it took more than 'several minutes' - more like 15.

  7. #6
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    2,915
    Thanks
    91
    Thanked 356 Times in 320 Posts
    Quote Originally Posted by timsinc View Post
    But Fred, your command line wasn't clear that you had to leave a space before each back slash.
    It's a space before each forward slash, not back slash.


    Quote Originally Posted by timsinc View Post
    (My machine would not let me paste into the command window).
    To paste into a command window, click the top left corner, then Edit, Paste (or just right-click).


    Bruce
    Last edited by BruceR; 2012-04-05 at 13:22.

  8. #7
    2 Star Lounger
    Join Date
    Nov 2011
    Location
    Berkshire, UK
    Posts
    128
    Thanks
    18
    Thanked 0 Times in 0 Posts
    > It's a space before each forward slash, not back slash.

    > To paste into a command window, click the top left corner, then Edit, Paste (or just right-click).

    Thanks Bruce - I'm living and learning!

    Tim

  9. #8
    New Lounger
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Great post. My WinSxS went from 28.8 Gig to 7.1 Gig!

  10. #9
    New Lounger
    Join Date
    Dec 2009
    Location
    Paris, France
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DISM actually increased the size of winsxs!

    I tried Fred's suggestion and it actually increased the size of my sxs folder from 12.3 Go to 12.4 Go!

    David

  11. #10
    New Lounger
    Join Date
    Dec 2009
    Location
    Cambridge, Ontario, Canada
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I followed your instructions and my WinSxS decreased from 24.4 GB to 9.64 GB in size (a gain of 14.76 GB!).

    I rebooted and made sure that my recycle bin is empty.

    My question is why does my C drive not show any more available space after this process? It still shows 18.5 GB free of 59.6 GB on a 64 GB SSD on my Asus EP-121. (The free space doesn't show as increased at all after running WinSxS and after shrinking the size of my WinSxS file from 24.4 GB to 9.64 GB). Obviously I missing a step or don't understand something.

    Thanks for any help.

  12. #11
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    135
    Thanks
    14
    Thanked 13 Times in 11 Posts
    Quote Originally Posted by rwnoble View Post
    I followed your instructions and my WinSxS decreased from 24.4 GB to 9.64 GB in size (a gain of 14.76 GB!).

    I rebooted and made sure that my recycle bin is empty.

    My question is why does my C drive not show any more available space after this process? It still shows 18.5 GB free of 59.6 GB on a 64 GB SSD on my Asus EP-121. (The free space doesn't show as increased at all after running WinSxS and after shrinking the size of my WinSxS file from 24.4 GB to 9.64 GB). Obviously I missing a step or don't understand something.

    Thanks for any help.
    Oh dear, I hoped no one would notice - here we go - yet again :!:

    This is another one of those old chestnuts the squirrels forgot to bury

    It's because most of the 'files' you think are "stored in" winsxs are also "stored elsewhere".

    In simple terms a file has two parts the data and an index entry in one or more directories (folder) - normally only one.
    However the NTFS file system allows the same data to appear in up to 1024 directories (folders).
    And I do mean the same data - not a copy, the same bits on the same sectors on the same track ... on the same disk.
    These are known as hardlinks. They are part of the furniture on most file systems, and they're NOT a Microsoft invention; I think they were 'invented' at Bell Labs NJ when Gates & Jobs were in grade school and Torvalds was in diapers , on reflection it may have been even earlier, on GE's Multics and/or Burrough's MCP in the mid 60's.

    The winsxs folder is one of the few (only ?) instances where MS make use of hardlinks

    Open up one of the folders in winsxs, right click a file, select Properties, if there's a Link Properties sheet open it (if there's not, choose another file/folder, shouldn't take long to find one) - you'll see something like this (selected from my winsxs folder at random)

    Type of link : Hardlink
    Reference count : 2

    Hardlink enumeration - [something like]

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\1033 \alinkui.dll
    C:\Windows\winsxs\x86_netfx-_vc_assembly_linker_messages_b03f5f7f11d50a3a_6.1. 7600.16385_none_39b823fd61508f9f\alinkui.dll
    If you were to remove alinkui.dll from one of those locations you would regain not one iota of disk space
    Directory information is held in an area known as the Master File Table (MFT) which is pre-allocated and has a fixed size
    So removing a directory entry also regains not one iota of disk space.

    Only if you were to remove alinkui.dll from both locations would you regain some disk space, but then your computer may stop working - so don't do it

    AFAIK Windows Explorer does not offer Reference count in its list of Columns that can be displayed in Detail View, which is a pity.
    I use xPlorer2 as an alternative to Windows Explorer, it's Pro version does offer Ref count in its list of Columns, not sure about its Free version.
    I also use LinkShellExtension, which I have configured to put a red arrow glyph on file icons that have multiple links.

    Utilities like Windirstat could use the information from the file properties to avoid counting stuff twice.
    I did ask Windirstat why they didn't - they blamed Microsoft

    It's disappointing that Fred Langa should write on this issue in the way that he has.

    I don't believe Fred does not know that most the files in winsxs are illusory, and getting rid of them will not regain much disk space.
    I'm not saying that running DISM isn't a useful thing to do, but as a disk space saving measure it can be very deceiving.
    Fred must know this and he should tell people about it - he writes after all in the 'paid for' section of the newsletter.

    If Fred doesn't know about hardinks and how they can create illusions; or if Fred doesn't know that many (most ?) of the files in winsxs are illusory, then maybe Fred's not as smart as I thought he was.

    NW
    Last edited by northwood2222; 2012-04-07 at 05:11.

  13. The Following 2 Users Say Thank You to northwood2222 For This Useful Post:

    RussB (2012-05-11),rwnoble (2012-04-07)

  14. #12
    New Lounger
    Join Date
    Dec 2009
    Location
    Cambridge, Ontario, Canada
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for your detailed and thoughtful explanation. It surely does answer my question.

  15. #13
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,656
    Thanks
    2
    Thanked 635 Times in 568 Posts
    @northwood2222 - WinSxS has changed usage considerably since its initial incarnation. Originally it was used only as you describe. Now starting with Vista and continuing with Win7 it is where all the files to service Windows reside. Using DISM after installing a service pack will remove a good many unneeded files - i.e. all the updates superseded by the service pack.

    See What is the WinSxS directory?.

    Joe

  16. #14
    New Lounger
    Join Date
    Dec 2009
    Location
    San Jose, Costa Rica
    Posts
    10
    Thanks
    0
    Thanked 2 Times in 1 Post
    For first time users of DISM, in Step 5, it would be useful to say WHEN DISM is finished running so as not to presume that 100.0% is the end... It is when "The operation completed successfully" and the C:\Windows\System32 reappears.... after some 20 minutes. Running Win7 ver 6.1.7601.17514 BEFORE running DISM, Properties of Winsxs showed 14.8GB, 16K folders and 78K files. After DISM finished, the FIRST look showed 7.15GB, 11K folders and 47K files... and after a few minutes of mail check and such, I ran it again... this time it showed 5.28GB, 9K folders and 38K files... so when a little later I ran Properties a 3rd time, I got 5.12GB, 9K folders and 37K files. MyComputer showed 134GB free space BEFORE running DISM and 136GB AFTER running DISM and restarting Win7.... a gain of 2GB after reducing a Folder from 14.8GB to 5.12GB... Northwood 2222 may have a point! Informative article as always, Fred.

  17. #15
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    135
    Thanks
    14
    Thanked 13 Times in 11 Posts
    Quote Originally Posted by JoeP517 View Post
    @northwood2222 - WinSxS has changed usage considerably since its initial incarnation. Originally it was used only as you describe. Now starting with Vista and continuing with Win7 it is where all the files to service Windows reside. Using DISM after installing a service pack will remove a good many unneeded files - i.e. all the updates superseded by the service pack.

    See What is the WinSxS directory?.

    Joe
    Joe - Windows 7 Disk Clean offers a much easier (better ?) way to do the Service Pack clean up than running DISM
    See ==>> http://windowsteamblog.com/windows/b...follow-up.aspx

    I run Disk Clean on my system drive once a week, so I would have checked the Service Pack Backup Files checkbox soon after the SP1 install.

    The Vista SP1 & SP2 packages came with specific cleanup utilities that MS recommended be run once the user was satisfied the SP had done no harm.

    It would be interesting to know if rwnoble & others who are "disappointed" in DISM's impact, had previously checked the relevant box in Disk Clean or run the post SP install cleanups on Vista.

    I stand by my criticism of Fred on this issue. Sending people off to the command line when there's a perfectly good tick-a-box solution at their fingertips (or purpose built program in the case of Vista) is less than I would expect of someone offering fee earning advice. Better advice would be

    • On Vista run the SP cleanup utilities, with the caveat "You won't be able to uninstall the Service Pack".
    • On Seven run Disk Clean, tick the Service Pack Backup Files box, with the caveat "You won't be able to uninstall the Service Pack".
    • Get rid of software you don't use, especially free software - you can always get it again, or better yet archive the install package.

    Sometimes it seems that no matter what MS do make users lives easier, the Windows guru's will soon find a way to make it hard again.

    NW

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •