Posted by & filed under Windows / Server.

With Windows Vista, the WinSxS folder was able to be cleaned up via a third party tool (WinSxS Lite here – Vista only!). With the initial release of Windows 7, we lost that capability – but it has since returned with Service Pack 1.

The WinSxS folder is used to store install and uninstall files, windows packages (current and previous versions of a component) and out-of-band releases. You should not completely delete this folder. Post Windows 7 SP1, there is now a way to remove the unnecessary files from this folder using the command line (elevated/admin mode -> Click Start -> Type “cmd” in Search. Right click on “cmd” and choose “Run as Administrator”). This is great for reducing the Windows folder size for SSDs and netbooks. In my case it saved 3.5GB of space.

 

dism /online /cleanup-image /spsuperseded

 

 

Before:

 

After:

81 Responses to “Reduce Windows 7 WinSxS Folder Size”

  1. Kevin

    This does nothing different than running “cleanmgr.exe” as administrator. In fact, Disk Cleanup can clean up more and has a GUI so you can be selective.

    This command saved me zero space since I had already cleaned it up.

    BTW, I am at an appalling 10.3GB for my winsxs folder. That’s insane.

    Reply
  2. Gabriel S. Martins

    solution for
    Error: 87

    press (Windows key)+(R), type: “msconfig” (enter), click on “Services” tab, Search “Windows Modules Installer” activate it, apply, ok.

    press (Windows key)+(R), type: “cmd” (enter), type: “net start trustedinstaller”.

    now “dism /online /cleanup-image /spsuperseded” should work.

    Reply
  3. Jot

    My winsxs has got to 16GB. The method used above ran but created an error message saying it hadn’t worked, and that is that ! Disappointed. Thanks for the posts. (Error number 0x80042302 whatever that means – off to Google it now ! )

    Reply
  4. Ian Broadbent

    The DISM command may be useful in some cases, where SP1 has been installed on top of the RTM version.
    But when run on a PC that was built from a source that has SP1 integrated, the message returned is:
    “Service Pack Cleanup can’t proceed: No service pack backup files were found.”

    Reply
  5. A. C

    Here is the fix for: “An error occurred accessing the temporary folder C:\Users\owner\AppData\Local\Temp\92A7CEF5-CA21-4E0B-98EF-FB18F36EFD80″, I had only 200mb free.

    it is because there is not enough space on hard drive, fix was to remove the paging file then reboot computer, then the command worked and free some space and I put back the Paging file later.
    You can also resize the paging file size and it should work.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>