Windows Vista Sp2 Winsxs Folder Cleanup

WinSXS is a known issue. (not sure of the relevance of DISM unlses you hjave left an image mounted or something?) I was in a similar situation a year ago with an 08 Server install.

40GB partition (seems like plenty), but I was down to 4GB (maybe it was 6GB) and all of it was due to WinSXS. I was not able to find a solution that dealt with the WinSXS folder. What I did do was set the min.

Swap file size to 512MB (I think that was the minimum). And then create another swap file on a different partition. Until then it was set to let Windows handle the swap file. And it was allocating over 12GB. So it immediately gave me 12GB back to work with, which bought me enough time to virtualize and solve the problem for good.

Since you're on Windows 2008 (vs. Windows 2008 R2), you can use the compcln.exe located in the C: Windows System32 folder Windows Component Clean Tool (COMPCLN) The Windows Component Clean Tool (COMPCLN.exe) can be used to remove the files that are archived after Windows Vista SP2 or Windows Server 2008 SP2 is applied. It also removes the files that were archived after Windows Vista SP1 was applied, if they are found on the system.

Running this tool is optional. Installing Windows Vista service packs increases the amount of disk space that is used by the operating system. This space is used to archive files so that the service pack can be uninstalled. Typically, you should run COMPCLN.exe if you want to reclaim this disk space after applying SP2 and if you will not need to uninstall SP2.

How to clean up and reduce the size of your WinSXS folder on Windows Vista SP1 or SP2. This uses the VSP1CLN.exe or COMPCLN.exe files. Clean Up the WinSxS Folder. This topic is about the different ways to reduce the size of the WinSxS folder on a running version of Windows 10. The /Cleanup. May 03, 2010 WINSXS folder cleanup W2K8 SP2. The size of the WINSXS folder running W2k8 SP2. It up referenced Vista.however nothing towards Windows.

Cleanup

You cannot uninstall Windows Vista SP2 or Windows Server 2008 SP2 after you run this tool on an image. This tool can be used online or offline. Molan wrote: Does anyone know of a way that actually works to shrink the size of the winsxs folder on Server 2008 SP2 x64. My Terminal server is almost out of hard drive space because this folder just keeps growing and growing. Its currently at 14GB and I only have 2GB free space left. I have seen numerous articles such as this one which say to use the 'DISM.exe /online /Cleanup-Image /spsuperseded' command to clean this up but it doesn't work. My server says DISM.exe is not a valid program Thanks I ran this as suggested, it freed 1GB of space Thanks.

But the winsxs folder is still over 12GB any other suggestions to shrink it further? Kelly Armitage wrote: If you have never used DISM to mount an image, there shouldn't be anything to clean up.EDIT. I just had a look at the link in your original post, and it looks to me like he is writing that from the point of view 'Microsoft has released a tool to take care of the WinSXS folder' which isn't the case at all.

DISM might have that as an added benefit in some cases, but that is not it's intended purpose. Kelly, Do you know of any methods to shrink the winsxs folder?

It is slowing devouring the hard drive on my terminal server. Molan wrote: Kelly Armitage wrote: If you have never used DISM to mount an image, there shouldn't be anything to clean up.EDIT. I just had a look at the link in your original post, and it looks to me like he is writing that from the point of view 'Microsoft has released a tool to take care of the WinSXS folder' which isn't the case at all. DISM might have that as an added benefit in some cases, but that is not it's intended purpose. Kelly, Do you know of any methods to shrink the winsxs folder? It is slowing devouring the hard drive on my terminal server. Sorry as I said in my first post.

After doing much of the research a few months back (unless something has changed) there is no real great method. The best you can do is via one of the 'cleanup' methods described above. (DISM and the other tool mentioned). BUT those might get you 2GB space back. Which will vanish again in X amount of months.

The single biggest thing I was able to do was set a fixed size to my swap file and then create a swap file on a different drive, roughly the size of what I 'removed' from C. That gained me 12GB in 5 minutes. All other efforts amounted to 1GB after hours and hours. (so move/change your swap file and buy yourself a year or 2).

. If you're looking to free up disk space and reduce the size of the WinSxS directory on Windows Server 2008 R2, make sure to check out the following blog post on this topic. ————————————————————————————————– A few months back, I wrote a post on. As a recap, the WinSxS directory is a large consumer of disk space on Windows Clients and Servers. Over time, the WinSxS directory steadily increases in size. So why is this? One cause of this is Windows Updates.

To allow the ability to uninstall an update, all the previously installed versions of Windows Updates are kept in WinSxS directory even when they become superseded by an update released in future. This accounts for Windows updates taking a lot of space and it continues to grow significantly as more and more updates are installed. So how do we cleanup the WinSxS directory? Well, with each service pack released, we also give the option of performing a cleanup that removes all previous versions of the files updated by the service pack. However, service pack 1 released well over 2 years ago, and there has not been another service pack since. Think about all those files updated by security updates and hotfixes? Up until today, we have not had the ability to cleanup these files.

But that all changes TODAY. New Important Update that Adds Windows Update Cleanup This morning, a new recommended update was released. It can be found. This update back ports some of the same functionality built into Windows 8 and later.

It gives us the ability to cleanup previous versions of the files superseded by Windows updates. Note: This is categorized as an “important” update. What does this mean for you?

This means it’s not a critical security update which means it may not be automatically installed or deployed depending on your Windows Update settings, WSUS settings, or other 3 rd party patch management software settings. Windows Update Cleanup Process So what does this process look like? After you install the update, click on Start, Search, type Disk Cleanup, and then right-click on Disk Cleanup and run it as Administrator. First, you are prompted to select the drive you want to clean up.

This is only valid for the operating system drive. So select C:. Disk Cleanup scans and calculates how much space you will be able to free on that drive: If you didn’t launch Disk Cleanup as Administrator, at this point, you’ll need to take a couple extra steps. You’ll need to click on the Clean up system files button. At that point, Disk Cleanup will relaunch as Administrator and you’ll need to repeat the first two steps again. So save yourself a couple extra clicks and launch Disk Cleanup as Administrator to begin with.

If you scroll through the files to delete, you’ll see the new option added by this update along with the amount of space you can save. It’s called Windows Update Cleanup. Notice it is checked by default? Note: If nothing is found for Windows Update Cleanup to perform, it will not show up as an option. Important note: After performing this cleanup, you may not be able to uninstall any of the updates currently applied. However, if you need to rollback to a previous version, you can still manually apply the previous version of the update.

If you highlight Windows Update Cleanup, you’re presented with the following details “Windows keeps copies of installed updates from Windows Update, even after installing newer version of updates. Windows Update cleanup deletes older versions of updates that are no longer needed and taking up space. (You might need to restart your computer).” When you click ok, Disk Cleanup runs and cleans up the unnecessary files on your machine. You can see it running the Windows Update Cleanup as part of this below: Disk Cleanup finishes and exits. In my experience with testing this update, we’re not prompted to reboot.

However, when you next reboot, you’ll see Windows configuring Windows updates on shutdown and Cleaning up on startup. The cleanup does take a few minutes so don’t be alarmed if it sits here for a minute or two.

The larger the cleanup, the longer it will take. But even on my machine with 1.78GB of files to cleanup, it still ran in under 5 minutes.

The amount of space you will save will vary by machine, but here’s a screen shot from another example: How to Automate Windows Update Cleanup I know running around and running Disk Cleanup on 10,000 clients isn’t anyone’s idea of a good time. So how do we automate this? Well, it’s a little cumbersome, but not too bad. It does take a bit of legwork first. It requires the export of a registry, and import of that registry on the clients. We can then use cleanmgr.exe (the command line version of Disk Cleanup) to automate Windows Update cleanup. First a little background.

Under the following registry key, we have a list of all the available disk cleanup plugins for Disk Cleanup: HKEYLOCALMACHINE SOFTWARE Microsoft Windows CurrentVersion Explorer VolumeCaches Here’s an example of what this registry key looks like on my Windows 7 SP1 client: Inside each one of these plugins, there’s a value called StateFlags. This is traditionally set to a value of 0 or 1. If it’s 1, it’s automatically checked when you run Disk Cleanup the next time. Here’s what it looks like for the Update Cleanup plugin on my Windows 7 SP1 client machine: In order to automate Disk Cleanup using cleanmgr.exe, we need to push a new StateFlags registry value to the plugins we want to automate. So how do we do this? Open an administrative command prompt and run the following command: Cleanmgr.exe /sageset:11 11 can be any random number you choose between 0 and 65535. It will then look just like running Disk Cleanup.

It will prompt you for the drive, present you with the options just like we did before. When it’s complete, if you go back and look at these plugins in the registry, you’ll notice the ones you had checked now have a new StateFlags value that corresponds to the number you specified with sageset. As an example here’s that same plugin now: It’s important to note that running sageset does not perform the cleanup. It simply updates the settings for that set. The cleanup isn’t performed until you run the sage run command shown later in this post.

Now that you have this set, you can export this StateFlags registry key for each of the plugins you wish to automate and import it on your other Windows 7 SP1 clients. Just make sure you export the StateFlags registry key that was newly added by the sageset command.

This will be the one that has the number you chose appended to the end. In my screen shot above, that would be StateFlags0011. Once you have this key exported, you can push these entries through Group Policy if you’d like, use a batch file, or other means. The choice is yours. After the import, you can then kick off cleanmgr.exe /sagerun:11 which will run through the same cleanup on all your clients.

More free space. Similar to the registry keys, you can push out a scheduled task that would then execute the previous command on your clients say once a month. However, you may not want to be this aggressive and you need to be careful about when this runs.

Remember, after you perform this cleanup, you cannot remove any Windows Updates that have been applied previously. You can still uninstall the latest updates that have been applied after the cleanup though, but it may take you all the way back to the SP1 level. You also do not want this scheduled task to run right after you apply updates. Depending on your patching schedule, you may want to schedule the cleanup to occur a day or two before regularly scheduled updates are applied. By default, the option to run a task as soon as possible after a scheduled start is missed is NOT checked. Because you do not want this to run right after applying new updates, I would advise against checking this box.

If it’s missed, let the cleanup slide to the next scheduled run. Thanks for breaking the news! I'd expect this info to come from Storage or Core team blogs first 🙂 I've got a couple of questions, though. Re: 'Important note: After performing this cleanup, you may not be able to uninstall any of the updates currently applied.' This statement is not clear, and the same goes about the KB article. In Windows 8 and 8.1, the cleanmgr operation is equivalent to: Dism.exe /Online /Cleanup-Image /StartComponentCleanup This does leave an option to uninstall the latest update and roll back to the older version.

Here's the GUI screenshot (Russian UI, though). In Windows 8.1 there's an additional DISM switch /ResetBase: Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase Using this option does remove the ability to uninstall the latest update So the 'may not be able' clause is confusing. You are either able or not, depending on what exactly cleanmgr does. Please clarify. What about DISM option? Are you aware of any plans to bring this feature to DISM in Windows 7 SP1? Automating cleanmgr is rather a workorund, and it doesn't really work on offline images.

Thanks, Vadim. Thank you, better late than never.

This is how Windows Vista should have shipped in 2006. Well if not Vista then what Windows 7 RTM should have had this ability in 2009. It was bad design right from the beginning and Microsoft knew it. They only didn't care about fixing it until Windows 8 when the mobile era arrived and huge capacity HDDs started getting replaced by smaller flash memory. Uncontrolled WinSxS growth was a huge problem for SSDs even for desktop platforms and servers and we kept telling MS and NOW they listen – 'ONLY' 7 years after Vista.

Hopefully that other disk space hogging behavior will be corrected as well which was introduced in Windows 7 where Windows Installer 5.0 caches the entire MSI in%windir%Installer without stripping off the CAB files stored inside it. That also causes serious disk bloat and needs to be addressed in the next update to Windows Installer. @MyNameIsYourWorstNightmare First thanks for taking time to post a comment. We are not ignoring you. You are clearly passionate about this topic which I think is a great thing. The KB is listed in the article “This morning, a new recommended update was released. It can be found here.” It links to.

However you’ll can catch more flies with honey than with vinegar. The group of engineers that maintains this blog (many on their own personal time) don’t actually write the code or maintain the feature you are asking for. We do have to take your feedback and bring it to the product groups. As little as you might believe it, we truly do lobby for you the customer. Many of us lobby extremely hard.

When we have more information to share on this topic, we will. I’m not sure if calling us monkeys is the best way to go about getting this feature you clearly desire. And while we are on that subject, these comments are a discussion with the community.

I think we have a pretty good community around here. There is a certain level of etiquette that should be followed. It’s not really documented anywhere but a level of just general politeness is expected between us community members. I don’t think your last two comments followed it.

So if you’d like to have a discussion about this topic we are happy to have it. If you want to continue down your current posting path, they will be deleted. Sorry that’s just how it will be.

Every time I update windows 7 especially this kind Security Update for Windows 7 for x64-based Systems I have this error 800f0826 then I Am requested to restart My computer to configure windows update' during configuring windows update it says Failed configure windows update' after that when reach to Desktop also I have this error (this error only in Desktop) 0xc0000005. Then I have to restore system. I hope you give me the right solution. I'm still now solving the problem and I Am insistent to solve this problem and I will be thankful if you give a solution' and I like to get experience from you. @ Mark, Gary & Charley Many thanks for your transport of feedback to the Product Groups. I’m looking for a way forward with the 2008R2 version.

Reading through this blog, it is easy to assume that the hurdle is the absence of the Disk Cleanup Utility in the 2008R2 Base Install But why does this upgrade have to work on a Base Install version of the Server? All you need to do is change the update’s current error message (on a Server) from (i) checking the IsWorkStation flag, to (ii) checking if the DesktopExperience is installed Wouldn’t that give a simple path forward for those willing to take the (2) steps required? @Charity Thanks for answering both questions 🙂 I fired up my Win 7 VM and verified that it was possible to uninstall all updates after the cleanup.

While this is not a comprehensive test, it is indeed consistent with /StartComponentCleanup. So it remains unclear under what circumstances it's not possible to roll back an update. While I understand that porting the feature to dism.exe can complicate various support scenarios, I'm wondering what prevented MSFT from implementing this feature earlier in Windows 7 SP1 cleanmgr 🙂 @TomislavRex's I concur your point about polluting the%temp% folder. But I guess the idea is that the user cleans up temp files during the next run, which takes care of the previously created GUID folder. Dear Charity After cleaning up, all the updates installed prior to cleaning are still perfectly uninstallable, up to the baseline, which will in all cases be, naturally, SP1.

This remains true whether you run this cleanup once or xyz times, so you might revisit the warning you wrote up concerning this 'danger/risk'. If this was the DISM /resetbase option available on Windows 8.1, your warning would make sense. On Windows 7 it doesn't. Another point of feedback – this tool leaves a copy of the DISM (=%WINDIR%System32Dism) folder in the%LOCALAPPDATA%Temp every time it runs, and this it does not clean up. Please pass that piece of information along.

@ JB +2 for fantastic shotcoming analysis. The review of the other left behind information and proposed methodology is very well done.

The comments about the importance of stale binaries not being left behind in user read/executable locatons are especially important. For prior examples, see Sun/Oracle’s decision to begin automatically removing prior JRE versions early in Java 6 distribution sequence, and their current 'Remove prior versions applet' precisely because of malicious abuse of stale binaries. Feedback re: Server 2k8, Vista, XP, 2k3. Support lifecycle says these are out of mainstream support phase and don’t get new feature development. Sure, I’d like to get the help, but not at the expense of getting the feature for 2k8R2 where I think prior comments have amply justified it.

I hesitate to say the update is 'owed' for Server 2k8R2, but it is certainly warranted, and despite MS’s hyperfocus on Win8x/Server12x to the near exclusion of workaday prior versions, those products are still in Mainstream support, and MS still has a commitment to them that I’d respectfully ask MS to honor. Congrats MS for a nice and useful beginning. Source: Windows 7 OEM media with SP1. Apply the WIM to the VM's VHD Boot the VM CTRL+Shift+F3 on the OOBE prompt Install all windows updates in audit mode Once all installed run cleanup disk and remove windows updates Seal the image with sysprep /generalize /oobe Capture the image with dism. Resulting OS will never boot and will get stuck at 'starting windows services'. Same process works for win8 images but win7 gold image creation potentially results in some very unexpected behavior 🙁 Probably a bad backport of a a feature.

This is nice, however it has a few shortcomings which it may or may not share with its version 8 cousin:. The description is misleading, it makes me think it cleans up the SoftwareDistribution folder, not the WinSxS folder. During the online part of the cleanup this actually consumes disk space, which is problematic if the disk (or its underlying sparse vhd) is out of disk space. It requires an extra reboot to complete the cleanup, which seems unnecessary. It doesn't cleanup other orphan 'assemblies' in WinSxS. It is only for one of 6 affected platforms: The following are missing: Server 2008 R2, Server 2008 (needed for 32 bit server applications), Vista (old but still supported), Server 2003/XPx64 (old but still supported), XP (old but still supported). Thus a new version of this which scans assembly manifests in installed files (throughout the disk) and identifies unreferenced superseded files in the 'WinSxS' and 'assembly' subdirs of%SystemRoot% would be much appreciated.

Note that such a tool needs to deal with the general dependency graph, but can limit itself to components that have a newer compatible version also in the cache. Thus for performance it would start by scanning the folders to clean up building a pre-pruned dependency graph, then eliminate nodes as it finds portions of the graph referenced in items elsewhere on disk. Please note that I have not given away any new techniques in this description, just common sense. Also this is a public comment, so no one should be able to patent this after the comment is posted.

Folder

Another benefit of such cleanup is to prevent security exploits from deliberately loading files that have been superseded by security updates. Keeping known insecure program files around in ready-to-run form after a security update is a bad idea. 6 months and still no apparent progress on a W2k8 solution. I appreciate your efforts to lobby the developers to address this, but it should not be so difficult to get M$ developers to put something in place that should have been there from the start.

I’ve not seen mentioned here but there’s a clear reason why this is required for 2008, more so than on W7. While on W7 machines (and Vista and XP before that) this is more of an annoyance for those with small OS volumes, it’s much more of an issue for servers. This is because typically desktop machines are backed up to onsite storage whereas servers, especially in small businesses, are backed up to offsite storage. Pre-Server 2008, SystemState backup was sensible and included only the information that was essential to restore a server configuration – about 650MB. As of 2008, Microsoft decided that SystemState should be a virtual OS volume backup and of course this includes the winsxs folder. This despite the fact that most of what is included can be restored from an image backup or by a reinstall and update.

Dism Cleanup Winsxs Windows 10

As this continually grows with mostly unnecessary data, backing up SystemState becomes more time consuming and costly. SystemState on a typical, fully patched SBS2011 server is now around 23GB!! There was never a need to retain the entire backlog of updates forever. Typically a faulty patch will exhibit issues immediately and be removed just as quick. We should always have been able to specify an automatic patch clean-up after say 30 days, by which time patches will have either proven themselves or been superseded and never need to be uninstalled.

With M$ only releasing one service pack for W7/2008, this issue is going to get worse, especially as most businesses will continue to use W7 until M$ finally realise that W8 is Vista revisited. We all hope W9 does for W8 what W7 did for Vista. Followed the instructions. I have Windows 8.1 and after doing everything I have read, I still have 8gb in the winsxs directory.

Most of the folders are for AMD, I have an Intel Processor. Amazing that after more than a year Microsoft has addressed this problem, but I know why. They are in cahoots with the hardware folks and doing everything they can to get you to get a new computer with a bigger hard drive. This is like ObamaCare and Gruber, tell them anything and they are so stupid they are sheep.

There was a time when Microsoft stood for something, I don’t believe it anymore. Why would I continue with Microsoft any longer? We’re all going to SSD drives and Microsoft must be investing in the SSD companies and then making us all continue to buy bigger drives. This is how the game is now played.

Comments are closed.