none
Windows\SoftwareDistribution Folder Cleanup Automation

    Question

  • Hi -

    I have a number of machines with a bloated Windows\SoftwareDistribution folder.  I usually address this by:

    1. Stopping the Automatic Updates service.
    2. Deleting the Windows\SoftwareDistribution folder.
    3. Restarting the Automatic Updates service.

    I'm considering using a computer startup script to perform this task automatically.  Does anyone have a more elegant method of automating this task?

    Thanks in advance for your input.

    Monday, August 22, 2011 6:45 PM

Answers

  • I am not aware of a 'best practice' way of reducing the size of the folder

    The 'best practice' is to never touch the folder.

    There is NO reason, on a properly functioning system, why this folder should ever need to be touched.

    The %windir%\SoftwareDistribution\Download folder is automatically maintained by the WUAgent. On the off-chance that the Datastore and the Download folder get de-synchronized, it may be necessary one-time-only to delete any content in the Download folder that is over 10 days old.

    Any continued issues is evidence of a more serious client health issue.

    In addition, the Datastore contains all of the Windows Update History for the client system. Destroying the SoftwareDistribution folder, except when expressly warranted due to error conditions for which destruction of the SoftwareDistribution folder is the only solution, destroys the entire Windows Update History for that client system.

    It also results in longer detection times at the next detection, because the WUAgent has to re-cache howeverMany thousands of available updates, as result of the destruction of the Datastore.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com

    • Edited by Lawrence GarvinMVP, Moderator Tuesday, August 23, 2011 2:57 PM Corrected reference to retention period in Download folder. Changed "30 days" to "10 days".
    • Marked as answer by Vincent HuModerator Thursday, August 25, 2011 7:05 AM
    Tuesday, August 23, 2011 12:12 AM
    Moderator
  • My WINDOWS folder itself has grown to over 11 Gb due to hundreds of $NtUninstallxxx subfolders.

    On Windows XP/2003 and earlier systems, the $NtUninstallxxx folders contain the rollback files for patch uninstallation. When a machine reaches the point that uninstalling a particular patch is not likely needed (because it broke something), or was installed so long ago (so is not practical to uninstall), you can safely delete these folders. (Or write them off to removable storage, or another volume, where they could be copied back if you actually did need them.)

    I typically delete anything more than 3 months old -- more an arbitrary decision than one based in any sort of thought-out logic.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Saturday, June 02, 2012 3:12 PM
    Moderator

All replies

  • You might want to put some timers in the following script so the commands don't overrun each other.

     

    net stop wuauserv
    del c:\windows\SoftwareDistribution /q /s
    net start wuauserv

     

    I am not aware of a 'best practice' way of reducing the size of the folder, but I have used methods similar to the one above.  However, I do not recommend having it as a computer startup script.  *Possibly* as a scheduled task that runs every quarter or bi-annually.

     


    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer".

    Rich Prescott | MCITP, MCTS, MCP

    Blog | Twitter: @Arposh | Powershell Client System Administration tool
    Monday, August 22, 2011 11:34 PM
  • I am not aware of a 'best practice' way of reducing the size of the folder

    The 'best practice' is to never touch the folder.

    There is NO reason, on a properly functioning system, why this folder should ever need to be touched.

    The %windir%\SoftwareDistribution\Download folder is automatically maintained by the WUAgent. On the off-chance that the Datastore and the Download folder get de-synchronized, it may be necessary one-time-only to delete any content in the Download folder that is over 10 days old.

    Any continued issues is evidence of a more serious client health issue.

    In addition, the Datastore contains all of the Windows Update History for the client system. Destroying the SoftwareDistribution folder, except when expressly warranted due to error conditions for which destruction of the SoftwareDistribution folder is the only solution, destroys the entire Windows Update History for that client system.

    It also results in longer detection times at the next detection, because the WUAgent has to re-cache howeverMany thousands of available updates, as result of the destruction of the Datastore.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com

    • Edited by Lawrence GarvinMVP, Moderator Tuesday, August 23, 2011 2:57 PM Corrected reference to retention period in Download folder. Changed "30 days" to "10 days".
    • Marked as answer by Vincent HuModerator Thursday, August 25, 2011 7:05 AM
    Tuesday, August 23, 2011 12:12 AM
    Moderator
  • While I agree with you Lawrence, the world is not a perfect place.  There are some companies out there that are still struggling with 40gb drives and cannot afford to upgrade them or have the SoftwareDistribution folder hog the space.  We would be much better off if everyone followed best practices, but sometimes it is just not an option.  That is the reason I stated that I was not aware of any related best practices and helped him towards his goal.

     


    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer".

    Rich Prescott | MCITP, MCTS, MCP

    Blog | Twitter: @Arposh | Powershell Client System Administration tool
    Tuesday, August 23, 2011 12:34 AM
  • While I agree with you Lawrence, the world is not a perfect place.  There are some companies out there that are still struggling with 40gb drives and cannot afford to upgrade them or have the SoftwareDistribution folder hog the space.  We would be much better off if everyone followed best practices, but sometimes it is just not an option.  That is the reason I stated that I was not aware of any related best practices and helped him towards his goal.

    I have rarely seen a case where the SoftwareDistribution folder requires more than a mere mimimal amout of space on any given system. On two different Win7 systems I have, the SoftwareDistribution folder consumes <100MB of disk space.

    The fact is that on most systems the WinSxS folder takes up exponentially greater amounts of space, and on any given system, the %TEMP% folder typically has about 10x the amount of content that exists in the SoftwareDistribution folder, because basic everyday disk management practices do not exist.

    Effective use of Disk Cleanup utilities will produce exponentially greater amounts of impact on disk management than worrying about the minimal content in the SoftwareDistribution folder.

    The information you provided him, reinforcing bad information unfortunately available widespread throughout the net (despite my best efforts to counteract, like in this thread), are destructive more than helpful, and remove critical information required for the efficient operation of Windows systems.

    The probem is that removing the "SoftwareDistribution" folder has become the be-all/end-all resolution to fixing WUAgent issues, and the fact is that it should be the Option Of Last Resort regarding WUAgent management. I estimate that 95% of instances where removing the "SoftwareDistribution" folder was used, was either not the correct remediation, or did not ultimately resolve the reported issue. Destruction of data is never the correct answer unless destruction of that data is the ONLY way to recover system functionality -- and even then, backup/restore/rebuild is still a preferable option in most cases -- so YES, I do have a claw up  my backside about this issue. :-)

    Deleting the SoftwareDistribution folder is WRONG. PERIOD.

    Any questions? :-)))))


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com

    Tuesday, August 23, 2011 1:50 AM
    Moderator
  • As the user mentioned the 'Automatic Updates' service and not 'Windows Update', that suggests to me that he is using Windows XP, not Windows 7.  Windows XP systems have typically been around longer than Windows 7 systems and so they will have larger SoftwareDistribution folders (3 SPs instead of 1 for Windows 7 and numerous other updates).  And as mentioned before, if a user has Windows XP, they are more likely to have older hardware, meaning a smaller HD.  The Disk Cleanup utility in Windows, in my experience, has been pretty useless. 

    Troubleshooting most Windows Updates issues comes down to the following items:

    1. Restart service
    2. Stop service, delete folder, start service
    3. Stop service, delete folder, delete SUS registry keys, start service, run 'wuauclt /resetauthorization /detectnow'
    4. Stop service, register dlls (msxml.dll, etc.), start service

    There are a few other simple troubleshooting steps, including looking at the text logs and event logs, but the majority of the issues are covered above.  Anything outside of those steps, I typically recommend reimaging the machine as any other troubleshooting will probably take more than 20 minutes, which is the time it takes to reimage a machine.  There are certain cases where reimaging the machine is not an option, such as mission-critical devices, but that is not the majority of systems.  I understand that you are an MVP on Software Distribution and most likely can figure out any issue within minutes, but for others it might be easier to reimage the machine and be done with it.

    ...

    I realize where you are coming from and if you were working for his company, you would do things differently.  But he is not you and does not have your competency with WSUS.  What might be an answer for one person/company is not always the answer for another.  I am a technical person by nature and prefer to troubleshoot issues so I can find the root cause to make sure they do not happen again.  Others are not fortunate to have the time available to do this and must do what they can to get the user back up and running.  Like I said, it is not a perfect world, but we do with what we have.


    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer".

    Rich Prescott | MCITP, MCTS, MCP

    Blog | Twitter: @Arposh | Powershell Client System Administration tool
    Tuesday, August 23, 2011 2:10 AM
  • Windows XP systems have typically been around longer than Windows 7 systems and so they will have larger SoftwareDistribution folders (3 SPs instead of 1 for Windows 7 and numerous other updates). 

    No, they will not, and the SoftwareDistribution folder does not contain service pack files beyond the transient period of time required for actual installation of that service pack. Furthermore, as noted, if the ~\Download folder contains any files older than 10 days, that's an indication that something else is messed up in the synchronicity between the WUAgent datastore and the Download folder. In that situation, a ONE TIME removal of files from the Download folder that are older than 10 days may be necessary. (Note: I misspoke in my earlier post and have edited that post to change "30 days" to "10 days".)

    What might be an answer for one person/company is not always the answer for another.

    Formatting the drive and reinstalling the Operating System is sometimes easier for some people than performing the proper procedures, but it's never an excuse. This forum provides support for a product that is designed for use in an environment with IT Professionals, so the working assumption is that all persons posting here are, in fact, IT Professionals. To that point, my working premise is that all persons here possess the ability to understand, and have the professional obligation TO understand.

    This is not a consumer forum designed to help users with Automatic Updates or Microsoft Update, so I will not "dumb down" anything in this forum. My working presumption in this forum is that people posting are WSUS Server Administrators and have a functional knowledge (or SHOULD HAVE a functional knowledge of how Windows systems are patched) -- this includes the requisite understanding of how the Windows Update Agent works. When that lack of knowledge is apparent, its incumbent upon those who have that knowledge to properly educate that IT Professional -- and this is what I am doing.

    Giving them BAD or INCORRECT information simply because it is "easier for them to understand" is not helpful; in fact, IMO it's somewhat condescending. As far as I'm concerned, the modus operandi in this forum is that the CORRECT ANSWER is the CORRECT ANSWER is the CORRECT ANSWER, and you can trust that I will call out INCORRECT answers anytime they appear.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com
    Tuesday, August 23, 2011 2:55 PM
    Moderator
  • Windows XP systems have typically been around longer than Windows 7 systems and so they will have larger SoftwareDistribution folders (3 SPs instead of 1 for Windows 7 and numerous other updates). 

    No, they will not, and the SoftwareDistribution folder does not contain service pack files beyond the transient period of time required for actual installation of that service pack.

    To this point, I have a Windows XP SP3 system that has been in service since June, 2006.

    The current size of the SoftwareDistribution folder is 139MB.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com
    Tuesday, August 23, 2011 3:20 PM
    Moderator
  • Thank you both for your feedback.  To clarify things a bit, the systems that are causing me pain are Windows Server 2003 servers.  Updates are approved on a monthly basis and are configured to automatically install and reboot on a scheduled basis.

    The systems in question are usually 5+ years old or are running SQL server.  In some cases, I have found that the WINDOWS\SoftwareDistribution folder exceeds 500 MB for a system that reports back to the WSUS console as being fully updated with nothing queued to install.  When the system in question has less than 1 GB of free space, that's a significant issue.  So it seemed to me that the issue is that, for whatever reason, the update source are not cleaning up after they have been installed.

    The instances where I have stopped the service, deleted the folder structure and restarted the service significantly reduces the amount of space used by the folder even after performing a detection.

    So here are my questions:

    1.  What are the downsides to deleting the Windows Update history?  As long as I retain the log files for the updates (Windows\KB*.log) and the associated uninstall folders, under what circumstances would I need to reference the Windows Update history and how would I do it?  (FYI - I'm getting pressured to move these folders and log files to another drive, which worries me but that's another discussion).

    2.  Under what circumstances would source content for an update that has applied successfully need to be retained in the \WINDOWS\SoftwareDistribution folder?

    3.  Is there an alternative, such as a cleanup tool switch that will allow me to keep this folder content clean?

    Thanks,

    -Rob

     

     

    Tuesday, August 23, 2011 6:18 PM
  • In some cases, I have found that the WINDOWS\SoftwareDistribution folder exceeds 500 MB for a system that reports back to the WSUS console as being fully updated with nothing queued to install.
    As noted, I would recommend a one-time removal of any files/folders from the Download folder that are older than ten calendar days.
    When the system in question has less than 1 GB of free space, that's a significant issue.
    Actually, when the SYSVOL has less than 20% free space, it's a signficant issue. However, recovering a few hundred megabytes of space from the WUAgent is like using an eyedropper to fill a bucket. I would suggest you focus your efforts on more high-value targets, such as %userprofile% TEMP folders; browser caches, the %windir%\ServicePackFiles folder, and anything else identified by running the Disk Cleanup Wizard.
    So it seemed to me that the issue is that, for whatever reason, the update source are not cleaning up after they have been installed.
    It is evidence that some content has been abandoned. Evidence that a current fault exists would be confirmed by content that is between 10-30 days old. If the July Patch Tuesday content is still there, or if the August Patch Tuesday content was installed before the 13th and is still there, that would suggest that the WUAgent is not maintaining the current content. Delete the content older than 10 days and monitor the folder.
    The instances where I have stopped the service, deleted the folder structure and restarted the service significantly reduces the amount of space used by the folder even after performing a detection.
    Yes, but it has other negative consequences that you have not yet had occasion to notice, including significantly increasing the system resources required to perform update scans, excessive network bandwidth utilization re-caching the ~100mb of content that is probably the DataStore.EDB, and destroying that machine's Windows Update History.
    So here are my questions:

    1.  What are the downsides to deleting the Windows Update history?

    Other than being absolutely unnecessary? Hard to say. If you NEVER need to refer to that Update History, then the downsides are nil; however, if you destroy information you might need at a later time to troubleshoot some other issue, you can't use what you don't have.
    As long as I retain the log files for the updates (Windows\KB*.log)
    Ironicaly, that's the JUNK you should be deleting! :-)
    and the associated uninstall folders
    Which are all generally useless more than 60 days after the update is installed IMO
    (FYI - I'm getting pressured to move these folders and log files to another drive, which worries me but that's another discussion).
    As noted, the KB*.log files and the NTUninstall folders can be safely deleted. I typically remove mine 60-90 days after update installation, as by that point, either the update is working (in which case the installation log and uninstallation folder has no real value), or it's already failed.
    2.  Under what circumstances would source content for an update that has applied successfully need to be retained in the \WINDOWS\SoftwareDistribution folder?
    As long as it is a VALID (i.e. Not Declined) update, it is retained in the DataStore.EDB so that the WUAgent can continue to report valid state/event data for that update. If an installed update gets uninstalled, and that update is not in the DataStore, how would the WUAgent know that the update was, once again, needed? It's really a moot point, though, as you cannot control this. The WUAgent caches update metadata for all relevant updates. That is one of the primary purposes of the DataStore, along with the installation history for those updates. If you destroy the DataStore, the cache (for hundreds, if not thousands) of updates must be rebuilt; the installation history cannot be rebuilt.
    3.  Is there an alternative, such as a cleanup tool switch that will allow me to keep this folder content clean?

    As I've already said -- a properly functioning WUAgent environment SELF-MAINTAINS this folder and there is no need to script maintenance activities on this folder. It is a SYSTEM folder and the SYSTEM should be left to manage the folder.

    If you really want to engage in disk maintenance activities to free up disk space, focus on the USER FOLDERS, which typically (in my experiences) will yield upwards of 10% of the capacity of the disk drive in deletable junk files.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2011)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    My Blog: http://onsitechsolutions.spaces.live.com
    Tuesday, August 23, 2011 7:52 PM
    Moderator
  • Thank you Rich.  This is exactly the information I was looking for as I have an XP system, in service since November 2007.  The SoftwareDistribution directory is 1.2Gb.  While I do have plenty of free space, I generally dislike bloat when it can be trimmed.
    Tuesday, November 08, 2011 11:16 PM
  • Lawrence,

    I have a server with a 35 GB partition that continues to grow uncontrollably:

    C:\windows\installer - 3.4 GB
    C:\windows\softwareDistribution - 2.3 GB
    C:\windows\winsxs - 9.1 GB

    I just moved our 6 GB swap file to a different partition to stablize the server giving me exactly 6.5 GB of free space on the C: partition.  Usage in temp directories is minimal.  I cannot find a straight answer on how to clean up the winsxs directory.

    Any guidence on where to go next once the server fills up again? 

    Monday, November 14, 2011 11:25 PM
  • The WinSXS can be safely deleted.  The (large) caveat to this is that you are deleting the backup files for Windows Updates and Service Packs.  If you delete them, you will be unable to roll back updates.  Be VERY sure that you are ok with the currently installed updates and service packs before you delete anything in the WinSXS folder.
    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP

    Engineering Efficiency
    @Rich_Prescott
    Client System Administration tool
    AD User Creation tool
    Tuesday, November 15, 2011 4:07 AM
  • WOW! NICE TRICK! Unfortunately, Microsoft often doesn't listen to his customers. I wanted a clean install. I did the updates... Why so much failed updates?? Anyway after doing all of them, I just wanted to clean Win updates and minimize the image I will create after that.

    This is just a matter of staying clean. Why windows folders are always so messy? with plenty of fails?

     

    If you have other tricks like that, I would like to know.

     

    5 stars! You definitivly are earing our call lol

    Friday, November 18, 2011 4:59 PM
  • This happens because windows update lets you select updates that are part of other updates. These smaller updates later fail to install because they no longer apply.
    Sunday, November 20, 2011 12:27 PM
  • No offense, but standard MS response to these issues seems to be similarly unhelpful. I have been reading for days now, looking for ways to reduce the unreasonably large and continually growing footprint of Windows 7, without any real answers. My Software Distribution folder is currently 1.3GB. That's completely unacceptable. The WinSxS folder is 6.5GB, which is also insane, but that's another entire kettle of stinking fish which I won't muddy this thread with. My install is exactly 2 days old, and I have very few programs on top of it (Microsoft Word and Photoshop are the main ones). Right now the install size is 17GB after employing every "best practice" tactic possible including not only everything discussed on these forums, but everywhere else on the internet that I can find, no kidding. Yesterday it was 10.5GB.

    The reality is these folders take up too much space, and users need an elegant way to deal with them. Reiterating what is unhelpful MS rhetoric (in bold and italics to emphasize that it's all been said before) isn't the answer. Best practice is to not create such clunky, inelegant OS systems, so "best practice" went out the window when we chose to install Win 7 etc. What we need are workable solutions, and a willingness from those so empowered to find them.



    • Edited by t0lkien Monday, January 16, 2012 6:58 AM
    Monday, January 16, 2012 6:51 AM
  • The WinSXS can be safely deleted.  The (large) caveat to this is that you are deleting the backup files for Windows Updates and Service Packs.  If you delete them, you will be unable to roll back updates.  Be VERY sure that you are ok with the currently installed updates and service packs before you delete anything in the WinSXS folder.
    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP

    Engineering Efficiency
    @Rich_Prescott
    Client System Administration tool
    AD User Creation tool

     

    Rich, are you certain about this? Everything I have read over the past 2+ days indicates in the strongest terms that deleting the WinSXS files is an absolute no-go, and will irrevocably break your Windows install. Have you tried doing this yourself? If so, what did you/did you not delete?

    Monday, January 16, 2012 7:19 AM
  • My Software Distribution folder is currently 1.3GB.

    My install is exactly 2 days old

    A couple of questions here:

    Did you install a base image of Windows 7 Service Pack 1 (released Spring 2011),

    or did you install a base image of Windows 7 (RTM) (released Fall 2009).

    If you installed the RTM version of Windows 7, and then applied a year-and-a-half worth of updates to the machine in 2 days, then a 1.3GB Download folder is **NORMAL** and **EXPECTED** -- particularly if you also then installed the Service Pack! If all of the updates have been installed successfully, then you can either wait another week and that folder will clean itself up, or you can delete the contents of the \Windows\SoftwareDistribution\Download folder -- but frankly, I don't think freeing up 1.3GB of disk space is going to make one whit of difference in the operation of your system.

    Fact is that Microsoft is very clear about the disk requirements to install an operating system, and the WINDOWS folder on a Windows 7 system is going to require upwards of 10GB of space. Disk space is **CHEAP**, so I'm not really inclined to be too sympathetic about people whining about a few GB of space they can't get back. If you're short on free space, buy a bigger drive. A 250GB drive is $80 at BestBuy; even cheaper on eBay. I run Win7 on an 80GB drive, with 50% free space on the machine I'm posting from, and I also have a copy running on a 40GB drive which is 90% full -- the point being that a 50GB drive is the minimum functional requirement to install a working Win7 system.

    Having said that, I'll also note that this thread has wandered excessively off-topic for this forum, so I would ask the participants to take the discussion of disk utilization by the Windows operating system to the appropriate Setup/Deployment forums, where those discussions are on-topic.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    Monday, January 16, 2012 7:30 PM
    Moderator
  • I have a different view coming from desktop administration. 1.3 gb of space is a big difference when you are deploying images over the network.  I try to keep the master image as small as possible to reduce bandwith and image times.  I only delete the files inside the downloads folder under softwaredistribution.  I test the image and make sure it works fine, so no need to uninstall the updates and I have a smaller desktop image size.

     

     


    Adam J.
    Friday, February 03, 2012 6:23 PM
  • I have a different view coming from desktop administration. 1.3 gb of space is a big difference when you are deploying images over the network.

    Your point is well taken; however, 1.3GB of content in an image is a completely different topic from 1.3GB of content in the ~\SoftwareDistribution\Download folder -- unless that content got there because it was erroneously burned into the master image.

    Fact is, on a Gigabit LAN backbone, 1.3GB of content is about 18 seconds of file transfer time. (1.3GBytes x 8 = 10.4 gigabits @ 600mb/sec practical throughput is 10.4 / 0.6 = 17.33 seconds.

    On a 100mbit/sec LAN backbone, assuming a practical throughput of about 60mb/sec, it would take a few minutes, worst case scenario.

    But this conversation is not about network utilization, it's about DISK utilization.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    Friday, February 03, 2012 10:44 PM
    Moderator
  • My Software Distribution folder is currently 1.3GB.

    My install is exactly 2 days old

    A couple of questions here:

    Did you install a base image of Windows 7 Service Pack 1 (released Spring 2011),

    or did you install a base image of Windows 7 (RTM) (released Fall 2009).

    If you installed the RTM version of Windows 7, and then applied a year-and-a-half worth of updates to the machine in 2 days, then a 1.3GB Download folder is **NORMAL** and **EXPECTED** -- particularly if you also then installed the Service Pack! If all of the updates have been installed successfully, then you can either wait another week and that folder will clean itself up, or you can delete the contents of the \Windows\SoftwareDistribution\Download folder -- but frankly, I don't think freeing up 1.3GB of disk space is going to make one whit of difference in the operation of your system.

    Fact is that Microsoft is very clear about the disk requirements to install an operating system, and the WINDOWS folder on a Windows 7 system is going to require upwards of 10GB of space. Disk space is **CHEAP**, so I'm not really inclined to be too sympathetic about people whining about a few GB of space they can't get back. If you're short on free space, buy a bigger drive. A 250GB drive is $80 at BestBuy; even cheaper on eBay. I run Win7 on an 80GB drive, with 50% free space on the machine I'm posting from, and I also have a copy running on a 40GB drive which is 90% full -- the point being that a 50GB drive is the minimum functional requirement to install a working Win7 system.

    Having said that, I'll also note that this thread has wandered excessively off-topic for this forum, so I would ask the participants to take the discussion of disk utilization by the Windows operating system to the appropriate Setup/Deployment forums, where those discussions are on-topic.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Dear Lawrence,

    I believe your opinion about disk space being **CHEAP** is a bit short sighted. I am a professional audio engineer and work on a Macbook Pro with a solid state drive installed. As you know a solid state is quite NOT **CHEAP** per Gb. Needing both Windows7 and OSX for my job, I want both OS systems to be as efficient as possible and not slurping up my disk space like candy...

    Rodger

    Saturday, February 11, 2012 9:48 AM
  • As you know a solid state is quite NOT **CHEAP** per Gb.
    And gasoline is not cheap for the owner of a Maserati, either, but I have little sympathy for their economic woes, as well. ;-)

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Sunday, February 12, 2012 3:12 AM
    Moderator
  • I am a Microsoft Trainer and have recently rebuilt an XP SP3 VPC for demonstration purposes.
    The C:\WINDOWS\SoftwareDistribution folder is currently 700MB+ and contains cabinet files for SP1 and SP3.

    You seem to be saying that the folder regulates itself and it will reduce in size after 10 days or so. Am I understanding you correctly?

    Regards
    Simon

    Wednesday, February 15, 2012 8:56 PM
  • You seem to be saying that the folder regulates itself and it will reduce in size after 10 days or so. Am I understanding you correctly?
    Yes.

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Thursday, February 16, 2012 5:46 AM
    Moderator
  • My Software Distribution folder is currently 1.3GB.

    My install is exactly 2 days old

    A couple of questions here:

    Did you install a base image of Windows 7 Service Pack 1 (released Spring 2011),

    or did you install a base image of Windows 7 (RTM) (released Fall 2009).

    If you installed the RTM version of Windows 7, and then applied a year-and-a-half worth of updates to the machine in 2 days, then a 1.3GB Download folder is **NORMAL** and **EXPECTED** -- particularly if you also then installed the Service Pack! If all of the updates have been installed successfully, then you can either wait another week and that folder will clean itself up, or you can delete the contents of the \Windows\SoftwareDistribution\Download folder -- but frankly, I don't think freeing up 1.3GB of disk space is going to make one whit of difference in the operation of your system.

    Fact is that Microsoft is very clear about the disk requirements to install an operating system, and the WINDOWS folder on a Windows 7 system is going to require upwards of 10GB of space. Disk space is **CHEAP**, so I'm not really inclined to be too sympathetic about people whining about a few GB of space they can't get back. If you're short on free space, buy a bigger drive. A 250GB drive is $80 at BestBuy; even cheaper on eBay. I run Win7 on an 80GB drive, with 50% free space on the machine I'm posting from, and I also have a copy running on a 40GB drive which is 90% full -- the point being that a 50GB drive is the minimum functional requirement to install a working Win7 system.

    Having said that, I'll also note that this thread has wandered excessively off-topic for this forum, so I would ask the participants to take the discussion of disk utilization by the Windows operating system to the appropriate Setup/Deployment forums, where those discussions are on-topic.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Mr. Garvin, when people come to a forum they are looking for help solving an issue. Not a condescending, asinine tirade detailing how people are whiners about disk space and gasoline in their fancy sports car. Furthermore, I was intrigued by your arrogance and decided to look up your credentials...impressed I am not. Of 7,951 posts, only 631 people thought they were helpful and that figures up to 8% of the time which means...wait for it...not much. In fact, I wondered how a CTO could post replies like that and still retain their position within the company. Then I looked up your company and I laughed so hard that I spit coffee all over my desk. What did you edit that website with??? FrontPage 98? I can say that it makes my top 10 all-time list of things to NOT do when creating a website. Please spare the internet from your future incompetence of web programming.

    And the fact that you tell people that this thread has wandered excessively off-topic and they should go post somewhere else is frankly irritating. That is exactly what this topic is about! The excessive disk space usage by the Windows OS! Just so all you people out there know, MVP means Microsoft Valued Professional which is a fancy term for someone that posts to the forum frequently. MVPs are independent of Microsoft, with separate opinions and perspectives, and are able to represent the views of the community members with whom they engage every day. So Mr. Garvin has no authority granted by the Microsoft Corporation to tell anyone anything. The only people that actually represent the company have the title, Microsoft, MSFT.

    Now I am a Senior Programmer/Analyst with a MS in Computer Science (woohoo) and I can tell you that when Windows 7 is using 80% or more of a 64GB SSD, there is an issue. Regarding the WinSXS directory, it is full of files you may or may not require to run applications that were designed for an older operating system. It is a .dll repository of sorts. I have an i7 Intel processor and there are many files within WinSXS that refer to an AMD64 processor. I find it hard to believe I need those files, but you never know. I can tell you that if you delete all the files in this folder, you will probably create yourself some issues with backward compatibility of applications designed for previous operating systems. I will continue to research this issue and update my findings if they are helpful.

    For those of you that are using the AVG Internet Security toolbar, a bug was introduced in version 9.0.027 that allows the log file for this application to grow to enormous sizes....sometimes 11GB in size. It continues to do so in AVG 2012. This hidden file is located at C:/Users/<username>/AppData/Local/toolbar_log.txt. The only way to get rid of it is to get rid of the AVG toolbar and then delete it.

    Also, you can use a folder migrating utility to move directories and files to a secondary hard drive. You can can also move the LocalLow and Roaming folders from AppData over to your secondary hard drive to keep some applications from writing to precious SSD space. Unfortunately, moving the Local folder is extremely difficult and should be left alone unless you are comfortable with editing the registry.

    And for those of you that would like a good laugh, stroll on over to Mr.Garvin's corporation website located at:

    http://www.onsitechsolutions.com/

    It's spew worthy after reading a few of his posts and all that MC this and that after his name.

    Bahahahahahahahahahahahahaha

    L. Skywalker


    • Edited by ElderJedi Monday, February 20, 2012 8:04 AM
    Monday, February 20, 2012 7:36 AM
  • I was originally just going to ignore the guy you mentioned. But when I read your message I thought Bravo! someone putting him in his place.  I thought the same exact thing about the poster. Arrogant and condencending.  However, I know he will proabably reply back saying the question is off topic. Which I agree completely with, he has changed the subject matter with his Arrogant answers.

    Adam J.

    Monday, February 20, 2012 3:01 PM
  • Though I understand Lawrence's concerns, my SoftwareDistribution\Download folder takes more than 1 Gb of my HDD. That's not a "minimal amount of space"...

    I have a 50 Gb partition and I can't expand it any more. My temp folders are empty and in a different disk drive, and I use the Disk Cleanup utility each and every day because I get constant warnings about my disk space running out. I've even created scripts to delete Visual Studio debug and trace files, but that doesn't fix that my Windows folder is taking 30 out of my 50 Gbs (Most of it comes from the WinSxS, Installer, Assembly and SoftwareDistribution subfolders).

    And lots of people like Lawrence keep saying that those folders CAN'T be touched, but they don't give an alternative solution (The "use the Cleanup utility" solution makes me laugh). In the end, I'll have to format and install everything all over again because Windows overfeeds with time and there's no real way of making it thiner... Next time, I'll deactivate automatic Windows updates. Oh wait! That's not 'best practice' either! I guess I'll just throw my laptop off the window, then.

    Wednesday, March 21, 2012 10:18 AM
  • SD Downloads is auto cleaned after a couple of weeks.  Purging more often than that can be done by stopping the service, clearing the downloads dir, then restarting WAU.

    SxS should not be purged entirely, but you can clean up older and duplicate cache files with DISM:

    dism /online /cleanup-image /spsuperseded

    Then, cleaning up temp spaces, such as with DiskCleanup helps.

    You're still left with remnants of uninstalled programs (MS and third party), plus various caches, duplicates etc.

    As has always been the case, an occasional clean reinstall from properly slipstreamed media is the best choice.

    Monday, March 26, 2012 6:37 PM
  • ... And the fact that you tell people that this thread has wandered excessively off-topic and they should go post somewhere else is frankly irritating. That is exactly what this topic is about! The excessive disk space usage by the Windows OS!


    Hello

    I came here looking for an answer to "why my softwaredistribution folder has 1.3GB?" and I get engaged by Mr Garvin answers :o)

    I agree with you, ElderJedi, except in that quoted thing. I think this topic is about a technical person living in his own world and real people trying to find answers in the real world.

    Good luck

    Monday, April 16, 2012 9:01 AM
  • ... And the fact that you tell people that this thread has wandered excessively off-topic and they should go post somewhere else is frankly irritating. That is exactly what this topic is about! The excessive disk space usage by the Windows OS!


    Hello

    I came here looking for an answer to "why my softwaredistribution folder has 1.3GB?" and I get engaged by Mr Garvin answers :o)

    I agree with you, ElderJedi, except in that quoted thing. I think this topic is about a technical person living in his own world and real people trying to find answers in the real world.

    Good luck

    Oh how true

    same problem here... and all you get are smoke blowers.... Thanks for the real answers chaps, stop service, delete folder, start service, jobs a good un.

    Thursday, April 19, 2012 10:16 AM
  • ElderJedi,

    You rock. I'm not sure I ever read a better right-hook in a forum. 

    The guy is down, the ref has finished counting.

    For the record, I totally agreed with Rich Prescotts original advice as an "every day" solution, but then *certain* people started getting anal about... well everything. 

    Yes, I'm qualified, a global IT Manager and very tech savvy. Mr Lawrence needs to learn to calm the hell down - or at least phrase things differently. But - given the photo and website.... can't see that happening any time soon. 

    Well done Jedi - an excellent KO for the little guys ;)

    Sith

    PS - OMG that truly is a terrible website..... The links... erm... well, they don't link? 
    Thursday, May 03, 2012 8:48 AM
  • Dear Lawrence,

    I have no idea which world you live in but in the real world, this folder gets absurdly bloated on even clean machines.  I found this thread when looking for a reminder of which services to stop because my three week clean install of Windows 7 x64 has a 3GB SoftwareDistribution folder, something the IT company that I run sees all the times.

    Ultimately, the user wasn't asking for advice on when or if he should empty this folder either - just a way to script it (because it IS something that needs to be done regularly).

    Regards

    Bob

    Friday, May 04, 2012 9:27 AM
  • Just when I thought nobody could beat my story, you did, Bob. I'll post it anyway -- I have a Windows Server 2008 R2 machine built only a year and a half ago. All it does is run SQL Server. It now has 2.2 GB in the SoftwareDistribution\Downloads folder (in 333 files). So yes, in the real world it does build up -- and it's also endangering the free disk space on that drive (all the actual data is on another, large drive).

    And nearly half of that space is in a single file, dated a year ago. Another 40% is in another single file about 6 months old. So no, the files don't necessarily get automatically deleted after 10 days.


    Tuesday, May 08, 2012 4:12 PM
  • I hope I'm not going off topic but this is easily one of the most hilarious threads I've read in quite a while. I was looking to clean up a recent XP install on a laptop with a 20GB drive. I had a bloated SoftwareDistribution folder and only about 5GB left so I was kinda panicking.

    For a few of the posts there, I was starting to buy into the shpiel by Fred Garvin (actually, you might want to goog that version of the name for another laugh) and was resigned to just leaving the damn thing until it basically exploded. Anyways, the one part of his advice I took was that I only deleted the contents of the download folder (ten days be danged), and I went out there and deleted some of the other folders mentioned. Everything seems to be running fine.

    I think the problem was that the guy's attitude blew up on his face. He was offering an option, and for some reason he chose to issue it as some sort of directive. Anyways, I can't stop laughing after seeing his site. One of the jokers in the office says it was made before the internet.


    • Edited by pcdropper Friday, May 11, 2012 3:30 AM
    Friday, May 11, 2012 3:29 AM
  • All -

    At the risk of spawning add'l acrimony, I found this post because of my desire to learn about cleaning up the WINDOWS folder itself, not the WINDOWS\SoftwareDistribution folder.  My WINDOWS folder itself has grown to over 11 Gb due to hundreds of $NtUninstallxxx subfolders.  I have been reading various posts on this and, like this thread, there is controversy over the prudence of simply deleting them.  The symptom that led me to even notice the folder size was/is system bog-down due to excessive harddrive IO while wuauclt.exe is running.  I'm on a Wondows XP SP3 system that's been around since 2006 as I recall.

    Do any of you have any observations on that?  It seems related to this thread, but perhaps not.

    Thanks.  Steve

    Sunday, May 27, 2012 12:15 PM
  • My WINDOWS folder itself has grown to over 11 Gb due to hundreds of $NtUninstallxxx subfolders.

    On Windows XP/2003 and earlier systems, the $NtUninstallxxx folders contain the rollback files for patch uninstallation. When a machine reaches the point that uninstalling a particular patch is not likely needed (because it broke something), or was installed so long ago (so is not practical to uninstall), you can safely delete these folders. (Or write them off to removable storage, or another volume, where they could be copied back if you actually did need them.)

    I typically delete anything more than 3 months old -- more an arbitrary decision than one based in any sort of thought-out logic.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Saturday, June 02, 2012 3:12 PM
    Moderator
  • SD Downloads is auto cleaned after a couple of weeks.  Purging more often than that can be done by stopping the service, clearing the downloads dir, then restarting WAU.

    SxS should not be purged entirely, but you can clean up older and duplicate cache files with DISM:

    dism /online /cleanup-image /spsuperseded

    Then, cleaning up temp spaces, such as with DiskCleanup helps.

    You're still left with remnants of uninstalled programs (MS and third party), plus various caches, duplicates etc.

    As has always been the case, an occasional clean reinstall from properly slipstreamed media is the best choice.

    Thanks to you, it really helped.

    From a clean install of Windows Server 2008 R2 Standard, with all updates (incl. SP1) installed, it took 15,4 Gb footprint.

    Running your dism command line freed 2,9 Gb, then cleaning the SoftwareDistribution\Download directory freed another 1,1 Gb.

    So, I got back 4 Gb just by doing these two simple points, falling from 15,4 to 11,4 Gb footprint.

    And when it comes to have multiple VMs on a laptop for dev/test/demo purposes, YES, 4 Gb less on multiple VMs makes the difference, cheap or not.

    Wednesday, June 06, 2012 12:06 PM
  • Lawrence - Thanks.  I'll give this a shot.  Steve
    Wednesday, June 06, 2012 11:34 PM
  • I have an i7 Intel processor and there are many files within WinSXS that refer to an AMD64 processor. I find it hard to believe I need those files, but you never know.

    FYI ElderJedi, believe it. That Core i7 Intel is actually an AMD64 architecture chip and the AMD64 tag is a reference to architecture not manufacturer. If Alpha, MIPS and/or PowerPC support hadn't been dropped before the .Net Framework timeframe, you might've seen those tags as well. Just like you may start seeing ARM tags once Win8 ships.

    At the risk of sounding pedantic, AMD is the one that added the x64 instruction extensions to the x86 chipset, since Intel was off playing with Itanium at the time. When it was clear that the x86 architecture needed 64-bit extensions (i.e. Itanium was sinking fast and AMD was eating their lunch), Intel licensed the extensions from AMD. So currently, the 64-bit processors that you find in commodity PCs are all AMD64 architecture regardless of whether they're made by AMD or Intel.

    Now, to bring this back on topic, don't delete those files from your WinSXS folder, especially if you're running a 64-bit machine. Bad things will happen.

    J. Eaby

    Wednesday, June 13, 2012 8:15 PM
  • Now I am a Senior Programmer/Analyst with a MS in Computer Science (woohoo) and I can tell you that when Windows 7 is using 80% or more of a 64GB SSD, there is an issue. Regarding the WinSXS directory, it is full of files you may or may not require to run applications that were designed for an older operating system. It is a .dll repository of sorts. I have an i7 Intel processor and there are many files within WinSXS that refer to an AMD64 processor. I find it hard to believe I need those files, but you never know. I can tell you that if you delete all the files in this folder, you will probably create yourself some issues with backward compatibility of applications designed for previous operating systems. I will continue to research this issue and update my findings if they are helpful.

    A senior programmer? A "Senior" would imply someone with knowledge and understanding in their field. I came to this thread to find out some information about the SoftwareDistribution folder and all I found was a bunch of children "member-measuring" in front of each other. ElderJedi, you resorted to abusing another member on the forum like a child and brought no value to the discussion at all. You talk about .dll repositories with no understanding of what AMD64 architecture is. You have a 64-bit processor in your i7 laptop, which is of AMD64 architecture. If I were your employer and read this post, I would be questioning your "senior" position as a programmer, who should know what AMD64 architecture is.

    As condescending as Lawrence's post may be, he is right. I couldn't find anything too wrong with anything he stated, as evangelistic as he is.

    I am no expert when it comes to WSUS and the SoftwareDistribution folder, but my only issue with Lawrence's post was this:

    "Destruction of data is never the correct answer unless destruction of that data is the ONLY way to recover system functionality -- and even then, backup/restore/rebuild is still a preferable option in most cases -- so YES, I do have a claw up  my backside about this issue."

    You cannot recommend someone rebuild a server simply because Windows Update doesn't work. That is not and efficient way of thinking, especially when you mentioned the "destruction of data is never the correct answer" in the same breath. When you have a corrupt Windows Update Repository Datastore, sometimes deleting this and allowing Windows Update to repopulate it is the best course of action.

    Onto the topic of discussion here. If you are deleting the SoftwareDistribution folder, recreating it and then pushing updates to it and wonder why it's growing... please put 1 and 1 together and figure out why. If you are worried about space on your system drives, expand them. If you still have physical servers running Windows 2003 that were upgraded from 2000/NT4, you should be virtualising or migrating off them. You are wasting your employers money playing cleanup duties on system drives when you should be solving real problems in your environment. Free space woes waste so much time and any good manager/senior engineer will know that migrating off that system is the more efficient solution than trying to get Server 2003 R2 to continue running on a 8Gb partition in preparation to "upgrade" to Server 2008 R2... you are dreaming.

    Sure I may not have added to this forum's topic, but just remember what this forum is "Social.Technet".

    Stefano

    Thursday, July 05, 2012 2:21 AM
  • but my only issue with Lawrence's post was this:

    "Destruction of data is never the correct answer unless destruction of that data is the ONLY way to recover system functionality -- and even then, backup/restore/rebuild is still a preferable option in most cases -- so YES, I do have a claw up my backside about this issue."

    You cannot recommend someone rebuild a server simply because Windows Update doesn't work. That is not and efficient way of thinking, especially when you mentioned the "destruction of data is never the correct answer" in the same breath.

    It was never my intent to suggest that somebody should rebuild a server just to repair Windows Update --- in fact, totally to the contrary. My point was that not even deleting the SoftwareDistribution folder is an appropriate methodology to repair Windows Update *except* in the very specific and well-known scenarios where diagnostic information demonstrates that the WUAgent datastore is corrupted, and then, deleting the SoftwareDistribution folder is the only viable remediation.

    When you have a corrupt Windows Update Repository Datastore, sometimes deleting this and allowing Windows Update to repopulate it is the best course of action.

    I absolutely agree. However, the problem is that 90% of scenarios allegely diagnosed as such -- have been improperly diagnosed!

    And, to that point, if the ~\SoftwareDistribution\Download folder has archaic content in it -- the fix is NOT to delete the entire ~\SoftwareDistribution folder, but rather to simply delete the archaic content that the Datastore thinks has already been deleted.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Product Manager, SolarWinds
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Thursday, July 05, 2012 7:25 PM
    Moderator
  • I can see this discussion has been going on for a while. I would have hoped someone from Microsoft or with an MS Support contract might have stepped in and cleared up the matter, but alas seems still left to people with although considerable experience, can't absolutely say for sure what to do about all these files. 

    Into that mix I can tell you my issue with the SD/Download folder is that I found when running a scan (using Malwarebytes) it was taking forever (seemingly over 30 min, hasn't finished yet so prompted me to google and here I am), I found there are 3,674 folders and almost 16,000 files and 4.63GB of data being taken up by the Download folder alone. I have a 750GB drive so space is not a big issue on this system but that would be a lot on my SSD HD laptop which only has 128GB drive. 

    My main reason for wanting to nuke it is the malware scan is taking forever and I don't see any reason to keep old files that are no longer needed. I'm going to delete everything prior to 2012. I hope I will be safe. 

    But the other point is it seems Microsoft is being a bit sloppy in not doing a better job cleaning up after themselves - imho. 

    Saturday, July 07, 2012 11:20 PM
  • whoa, holy crappola, same issue with winsxs folder, 18.5GB, 18,099 Folders within that folder and a whopping 74,641 Files. 

    Full disclosure I'm running a Vista 64-bit circa 2008 so I've had some time to build up files. But again, why can't Microsoft clean up after  themselves better. The scans are taking forever to get through what no doubt is mostly garbage at this  point. 

    imho Microsoft has spread themselves too thin trying to take over market share in areas they are doomed to under achieve. They should put more focus on their core products, OS and office productivity. Their OS's still seem to have some glaring deficiencies. 

    Saturday, July 07, 2012 11:49 PM
  • My main reason for wanting to nuke it is the malware scan is taking forever

    Strictly speaking, your malware shouldn't be scanning the folder anyway. Everything in that folder is validated by digital certificate and SHA-1 hashing. (Although, in the wake of Flame, one wonders . . . )
    and I don't see any reason to keep old files that are no longer needed. I'm going to delete everything prior to 2012.
    Absolutely. In fact, you can delete anything dated prior to June 28th. :-)
    But the other point is it seems Microsoft is being a bit sloppy in not doing a better job cleaning up after themselves - imho.
    The point made way early in this thread is that the WUAgent does clean up after itself on a well-functioning system. But there's a combination of actions that can break that functionality (I'm searching my email archives for the email I received that describes the exact scenario.), and the WUAgent (due to data in the datastore) doesn't remove files it should.

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Product Manager, SolarWinds
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Sunday, July 08, 2012 2:12 PM
    Moderator
  • whoa, holy crappola, same issue with winsxs folder,

    No, that's not the same issue. The ~\SoftwareDistribution\Download folder is supposed to be self-maintaining. The WinSXS folder is a permanent archive and is designed to be that large on a system with years of patches applied. (It's why the disk space requirements for the OS are what they are.) The fix for a large WinSXS folder, particularly on an original RTM system, is to uninstall/reinstall the OS (with the latest SP slipstreamed), and then apply the post-SP patches.

    Also, you should exclude the WinSXS folder from your malware scan.

    Their OS's still seem to have some glaring deficiencies. 

    Or... maybe... ITPros should learn the architecture and operation of the Operating System before becoming a critic. :-)

    The fact that you're still running a Vista x64 system in 2012 speaks much more to the point than I think you may imagine. :-)


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Product Manager, SolarWinds
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin



    Sunday, July 08, 2012 2:15 PM
    Moderator
  • And how about to delete only particular folder under "SoftwareDistribution", Datastore?

    I'm trying to fix wuauclt.exe startup problem. On the base of the ansewr http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_update/wuaudtexe-is-really-bogging-down-my-computer/ef18ff87-db7f-4705-8105-33dcf9a9a03b is this not an critical procedure?!

    Or am I wrong?





    Zlatko Glavač

    Wednesday, September 26, 2012 7:31 AM
  • I'm trying to fix wuauclt.exe startup problem. On the base of the ansewr http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_update/wuaudtexe-is-really-bogging-down-my-computer/ef18ff87-db7f-4705-8105-33dcf9a9a03b is this not an critical procedure?!

    Or am I wrong?

    If you are having performance issues with the WUAgent, deleting/rebuilding any or all of the SoftwareDistribution folder is not likely going to help, but *renaming* the SoftwareDistribution folder is a valid diagnostic step. If the performance improves, then perhaps, as the MS Answers thread from 2010 suggests - it was a defective data store -- however, given that time frame mid-2010 and on XP systems, I'm much more inclined to think it was the Office 2003 issue. Around that time frame, a number of systems with Office 2003 and 8 years of updates applied, and to a lesser extent even today, some Office 2007 systems that are approaching 5 years of updates applied, had performance issues because of the number of update packages in the MSI Installer folder. For those systems the remediation was to uninstall Office 2003 (or Office 2007) and then reinstall Office with the latest service pack, and then apply the remainder of the required Office patches.

    But not withstanding that possible scenario, the SD folder is merely a cache of what's on the WSUS server relevant to that particular client, so performance issues are almost always an effect of what's on the WSUS server. You can search this forum for the keyword 'timeout' and find dozens of discussions of this condition.

    Fundamentally it revolves around these questions:

    • How many updates are on the WSUS server? (If it's more than a few thousand, that's a problem.)
    • How many approved updates are on the WSUS server? (If it's more than a few hundred, that's a problem.)
    • How many groups are configured on the WSUS server? (A large number of groups can exacerbate the problem with the previous two values.)


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Product Manager, SolarWinds
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Thursday, September 27, 2012 11:48 PM
    Moderator
  • Lawrence -

    Your observations seem to make a lot of sense, though I don't pretend to fully understand (especially the part about WSUS).  I have what I hope are two simple follow-up questions, one related to wuauclt (my problem appears to be intense harddrive activity connected with wuauclt) and one related to the possible Office 2003 reinstall fix. 

    1. Re wuauclt, you mention in a different post the need to know what version is running.  How do I find that  out and what minimum version do I want?

    2. Re Office 2003, About MS Office says I am running Offcie 2003 (11.8346.8341) SP3.  Does the fact that it says SP3 mean that my problem would likely not be solved by an Office 2003 reinstall?

    Thanks.

    Steve

    Wednesday, October 03, 2012 9:14 PM
  • one related to wuauclt (my problem appears to be intense harddrive activity connected with wuauclt)

    Could be one of three things:

    • A lot of effort reading from a highly fragmented WUAgent Datastore.
    • A lot of disk thrashing reading the %windir%\Installer folder.
    • Paging activity caused by a memory starved system.
    1. Re wuauclt, you mention in a different post the need to know what version is running.  How do I find that out and what minimum version do I want?

    It's logged at service startup in the WindowsUpdate.log, and at every detection event. It can also be determined by checking the file version of the wuaueng.dll or wuauclt.exe file in %windir%\system32.

    2. Re Office 2003, About MS Office says I am running Offcie 2003 (11.8346.8341) SP3.  Does the fact that it says SP3 mean that my problem would likely not be solved by an Office 2003 reinstall?

    Not at all. In fact, that you are still running Office 2003 makes this a high probability condition. The mere fact that Office 2003 is still installed on a machine suggests that the Office installation has been in place for several years, inasmuch as most systems built after 2007 shipped with Office 2007. However, I will grant that some organizations have not upgraded, or are unable to upgrade, and are still using Office 2003 because it's all they have.

    What's the relevant point is how Office 2003 has been updated. If the earlier service packs were installed, and all those years of security and critical updates, then it's quite likely that all of this is related to an overflowing ~\Installer folder.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Thursday, October 04, 2012 12:27 AM
    Moderator
  • Thanks, Lawrence, for the direct and to the point reply.  I will follow-up on all the observations you made.

    Steve

    Thursday, October 04, 2012 12:46 PM
  • This thread was fun to read. I would suggest Lawrence to install WEDU (Windows Embedded Developer Update), run it on the WES distribution shares to update those - and then look how wonderfully does the Windows\SoftwareDistribution\Download folder "self-maintain" a couple of weeks later. Just wiped 8 GiB worth of junk from there. (Still scratching my head regarding who on earth in MS thought that this place on %systemdrive% is a wonderful "storage" place for similar onetime junk.)

    Friday, November 23, 2012 6:49 PM
  • This thread was fun to read. I would suggest Lawrence to install WEDU (Windows Embedded Developer Update), run it on the WES distribution shares to update those - and then look how wonderfully does the Windows\SoftwareDistribution\Download folder "self-maintain" a couple of weeks later. Just wiped 8 GiB worth of junk from there. (Still scratching my head regarding who on earth in MS thought that this place on %systemdrive% is a wonderful "storage" place for similar onetime junk.)

    Yes, a great tool to use on the WES Distribution Shares ... but I don't think anything in this thread had anything to do with managing/patching Embedded Systems.

    As for your commentary on the content of the ~\Download folder ... (or why it doesn't self-maintain on a WES Dist Share without the WEDU) I would refer you to a Windows Update primer, specifically the sections on the Windows Update Agent.

    The ~\SoftwareDistribution folder has been a primary stable of Automatic Updates for more than a dozen years. The ~\Download folder is 'self-maintained' by the Windows Update Agent -- an entity notably missing from your WES distribution share. Its stored there specifically because it's in the %windir% folder tree on the %systemdrive% and requires certain protections which make it inappropriate to be stored outside of the %windir%, and the WUAgent is a core component of the operating system.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

    Friday, November 23, 2012 10:06 PM
    Moderator
  • Thank God that the useless junk has been kept stable in a safe location on %systemdrive% for more that a dozen years. Hallelujah! And surely permissions do not work on any other drive.

    Others have already summed up your "contributions" nicely above, and since my personal experience with your "advise" (coming from the WSUS language packs thread ) - pretty much exactly mirrors what others have observed on this one - nothing more to add here, sir. Have a nice day. :P


    • Edited by Doktor Notor Saturday, November 24, 2012 6:50 PM
    Saturday, November 24, 2012 6:48 PM
  • Hey people/nerds/prophets/zealots/followers/unstable system phobics and HDspaceclaustrophobic brothers

    I installed a SSD on my PC and i have also space saving issues. Found this site when looking for folders i can empty in google. I found it quite interesting to follow you. But noone could say how it will affect the system.

    After the discussion about WinSXS the idea came up to look in the registry if anything does refer to any of the content in there...

    the search in winreg brought nothing up except the link to the pending.xml file in there....

    so couldnt this be a clear yes to delete the content without having troubles? doesn't look like i need the files to run old stuff. just to put back my system on an old inupdated stage which only a few want to do..except when installing tools like searchbar..access to the winsxs must have been hard coded...but still it would at least be somehow mentioned as a important system path....and this isnt the case at all...registry ignores that path....sigh my recommendation: install all the updates, make image, then delete everything install all kinf od programms that can be updated outdated and need removal.... image again...and whenever you have new windows related updates that are not removed remove the new added content in those folders they drop stuff.

    i did a check on the files if i find them in another directories in the windows folders...and really i found them in well known system folders, where they are also refered in the registry too.

    however i make a sysimage to another drive and then i delete all these files not caring all the warnings...i can still return to the old stage when bad predictions come true.

    Kindly

    Konrad

    Im just a regmanipulating nerd. no MC whatever that always has his sysimage in the backhand. and is extraordinarly happy when that following images are just little. Since i am kid i love to check and manipulate all the files with systeminformation in it, to tune up system manually, free space, as it was in old times with ms dos freeing space in the 640kb base memory....

    maybe the microsoft operating system programmer dudes were so much traumatizised from ms dos memory management, that they were  swearing never ever making the same mistake again...so they outsourced it to the harddrive. they never thought about us, that come after them with SSDs....

    is windows 8 in littering any better? i mean it is made for tablets..it should, has to be!!!!!!

    Tuesday, November 27, 2012 2:47 AM
  • Your attitude about how windows is right and the user is wrong is condescending. If windows does not respect user's hard drives, windows is broken. It holds people's computers hostage. My advice? Switch to Mac. Everyone else is.
    Tuesday, January 22, 2013 6:55 PM
  • My advice? Switch to Mac. Everyone else is.

    Well, let's hope you're not a financial advisor.  Stock price down 35% in the last four months, with a 20+% year-over-year decrease in Mac sales...it seems "everyone else" may not be on board.

    I had to read it again to make sure you really said "condescending" in one breath and "switch to Mac" in the next.

    Thursday, January 24, 2013 8:59 PM
  • I had to read it again to make sure you really said "condescending" in one breath and "switch to Mac" in the next.

    :-)

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Distribution (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Saturday, February 02, 2013 11:59 PM
    Moderator
  • I installed 3 servers with an image of server 2008 R2 SP1.

    I ran into this thread looking for ways to minimize unnesessary files on the C: drive.

    Thanx for all the information and rants, was a fun read ;-)

    Keep up the good work Lawrence, found a lot of useful information in your posts.

    maybe ease on the "I am smart and you are stupid" style of writing, but hey, if it weren't for you, they wouldn't know, right? :)

    Thursday, March 28, 2013 9:46 AM
  • Mr. Garvin,  I respect your reputation and appreciate sharing your knowledge, but I also have an XP SP3 system where the SoftwareDistribution folder is over 1GB, and the *entire* documents and settings folder (not just application data) is only 1.5GB.  There is no low-hanging fruit on this system; disk cleanup has been run many times over the years, and running with 5% free space (much less 20%) is a luxury.  The Windows folder takes up 7.5GB including the 1GB for SoftwareDistribution and nearly 2GB for $hf_mig$, and since many of the files in Download date back to 2009, it obviously is not being properly self-maintained.  You need to recognize that your personal experience does not reflect the personal experience of everyone else.

    Thank you for the information that Download content over 10 days old can safely be deleted (regardless of whether it is aesthetically pleasing); I will proceed to do so.

    Friday, April 19, 2013 10:57 PM
  • Lawrence,

    I have a few servers running Windows Server 2003 and they are all experiencing greatly diminished disk space in the system partition. I checked the SoftwareDistribution folder on one server and it's topping 2.3 Gb. The Download subfolder contains files dating back to 2007 when the server was new. Are you certain this folder is automatically maintained? The system partition is down to 1.3 Gb of free space and I've removed everything possible without resorting to the methods described in this thread. Needless to say, but I will be manually cleaning up the Download folder.

    Thanks.

    Tuesday, July 16, 2013 5:51 PM
  • Are you certain this folder is automatically maintained?

    The design is for the folder to be automatically maintained. However, it's not unheard of for the datastore to get out of sync with the content cache.

    As noted previously, anything older than 10 days can be deleted. Following that you should monitor the folder to see if subsequent files get deleted as they should. If they don't, the datastore may have inconsistencies.

    An option in this case is to rebuild the datastore. (Stop WUAUSERV. Rename the SoftwareDistribution folder. Start WUAUSERV. Copy the old ReportingEvents.log to the new SoftwareDistribution folder.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Tuesday, July 16, 2013 9:55 PM
    Moderator
  • Wow.  I'm blown away by the arrogance of your "answers."  This is an old thread that seemed relevant to a question I had, but I'm done reading at this point.  To speak in such absolutes without any explanation as to why makes me want to argue with you just because of your arrogance.
    Thursday, August 15, 2013 5:20 PM
  • Wow.  I'm blown away by the arrogance of your "answers."  This is an old thread that seemed relevant to a question I had, but I'm done reading at this point.  To speak in such absolutes without any explanation as to why makes me want to argue with you just because of your arrogance.

    Not really sure where you stopped reading, since you didn't quote the message you're actually responding to...

    But never make the mistake of confusing "arrogance" with accuracy, or the right to aggressively defend one's beliefs in those facts. There is nothing in any of my posts in this thread that is not 100% factually accurate. True, perhaps you don't like the confidence with which I chose to make my points. I accept that.

    As for "without any explanation"... exactly which point in this thread do you feel was provided "without any explanation". My take was that I explained the basic points several times over. If you feel there's something lacking in any of the above responses, I'm most happy to expand on the subject.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Friday, August 16, 2013 5:51 PM
    Moderator
  • The WinSXS can be safely deleted.  The (large) caveat to this is that you are deleting the backup files for Windows Updates and Service Packs.  If you delete them, you will be unable to roll back updates.  Be VERY sure that you are ok with the currently installed updates and service packs before you delete anything in the WinSXS folder.
    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP

    Engineering Efficiency
    @Rich_Prescott
    Client System Administration tool
    AD User Creation tool

    WinSXS actually DOES NOT take so much space. The number shown by explorer and other tools is misleading, because this folder contains many hard links to other places in c:\windows, so the space occupied by the files which are actually present in WinSxS folder can be much smaller then what you see in folder properties!

    http://support.microsoft.com/kb/2795190

    http://www.sevenforums.com/general-discussion/24954-winsxs-folder-not-actually-consuming-lots-space.html


    Wednesday, October 09, 2013 11:07 AM
  • Wow.  I'm blown away by the arrogance of your "answers."  This is an old thread that seemed relevant to a question I had, but I'm done reading at this point.  To speak in such absolutes without any explanation as to why makes me want to argue with you just because of your arrogance.

    Not really sure where you stopped reading, since you didn't quote the message you're actually responding to...

    But never make the mistake of confusing "arrogance" with accuracy, or the right to aggressively defend one's beliefs in those facts. There is nothing in any of my posts in this thread that is not 100% factually accurate. True, perhaps you don't like the confidence with which I chose to make my points. I accept that.

    As for "without any explanation"... exactly which point in this thread do you feel was provided "without any explanation". My take was that I explained the basic points several times over. If you feel there's something lacking in any of the above responses, I'm most happy to expand on the subject.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    I have come across this thread a few times (or a similar one with Lawrence stating that it is just wrong to mess with that folder) and can usually only get about 5-6 posts down.  As a consultant, I see a number of servers and I need to check my memory each time because I have seen so much.  I have had a couple of 2003 servers with a 12 GB C: drive.  I have also found that the %windows%\softwaredistribution\download folder was almost 2 GB.  A lot of these files could be up to 4 years old.  I have not had access to these servers previously, and I am looking to replace these servers as soon as possible, but when the C: drive drops to a couple hundred MB, the server is in danger of crashing due to space issues.  These have been servers that for the most part, no one was doing updates on a regular basis.  It is not until pretty low in the exchange that you mention that it is possible that there may be a reason to move or delete the files.  It is not the most helpful of responses.  I understand that you want to stress the fact that it should not be done, and I can appreciate that.  But if you could stress that and then explain early in, that there may be some rare situations that it could be used, it could make for a better read.

    Just my 2 cents.

    Tuesday, November 12, 2013 2:26 PM
  • I have come across this thread a few times (or a similar one with Lawrence stating that it is just wrong to mess with that folder)

    Then hopefully you also read the part that says: However, if there are legacy files in the ~\Download folder, this may indicate an issue with the integrity of the datastore. It is safe to delete the files from the ~\Download folder that are older than 10 days. Then monitor the client to see if it continues to properly self-maintain the folder thereafter.

    Please do not confuse the discussion about cleaning the ~\Download folder with the all-to-common and usually-most-inappropriate practice of deleting the ~\SoftwareDistribution folder in order to 'fix' issues with the Windows Update Agent. In reality, less than 1% of issues with the WUAgent actually require the deletion of anything on the client side, and, in fact, deleting the ~\SoftwareDistribution folder destroys potentially valuable forensic and diagnostic information that would be useful when the problem reappears.

    One other note... I've also often pointed out that the extra space consumption being used by a dysfunctional ~\Download folder is usually trivial compared to the extra space consumption being used by other filesystem resources, and it's almost always much more efficient to focus on those other resources to reclaim needed space.

    Of course, it's also worth noting that any server with only a 12GB system partition was already in trouble the day the operating system was installed onto it. :-)

    Reclaiming 2GB of space from the ~\Download folder is still going to give you a system volume that is 83% full. In that case, you must also focus on other space consuming resources, because you still need another 2GB of free space beyond that.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Thursday, November 14, 2013 5:10 PM
    Moderator
  • Interesting discussion, and some popcorn-worthy drama, but a dose of reality is needed.

    "There is NO reason, on a properly functioning system, why this folder should ever need to be touched."

    There's also no reason for someone with a properly functioning system to ask this question.

    People don't arbitrarily decide to go delete random folders from their systems, they're looking for answers to this question for a specific reason. Per Mr. Garvin's own posting, if the SoftwareDistribution folder has grown large and contains old content, then by definition it's NOT a properly functioning system, so all the sturm und drang over whether it's a best practice for a properly working system is irrelevant.

     


    Sunday, November 17, 2013 2:22 AM
  • if the SoftwareDistribution folder has grown large and contains old content, then by definition it's NOT a properly functioning system, so all the sturm und drang over whether it's a best practice for a properly working system is irrelevant.

    Good point! It's not a "properly working system".

    I think the question here is the proper methodology to diagnose and remediate that not-working system.

    • If the WUAgent datastore is corrupted (read: broken; read: the WUAgent is Not Working) then the only remediation is the destruction of the Software Distribution folder.
    • If the WUAgent is working, then deleting the Software Distribution folder is NOT the appropriate remediation.
    • If the Software Distribution folder is large (because the Download folder is large), then the correct remediation is to delete the old files in the Download folder.
    • In some cases, RENAMING the Software Distribution folder may be a useful diagnostic tool.

    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Thursday, November 21, 2013 6:43 PM
    Moderator
  • Lawrence:

    I have been reading through this thread and wondered if there are any significant cons to using Windows compression ie applying "Compress contents to save disk space" on windows\SoftwareDistribution folder? 

    Thursday, January 02, 2014 12:56 AM
  • Lawrence:

    I have been reading through this thread and wondered if there are any significant cons to using Windows compression ie applying "Compress contents to save disk space" on windows\SoftwareDistribution folder? 

    There's no harm in compressing the folder.... although most of the files in the folder tree aren't going to be compressible. First, you've got a JET database in the ~\Datastore folder (which is 294MB on my system, as compared to the ~\Download folder which is only 12MB), which can't be compressed.

    Second, most of the files (except any extracted folders left behind by misbehaving installers) in the ~\Download folder are going to be CAB files.. which are already compressed.

    The preferable option is to remove the legacy (over 10 days old) files from the ~\Download folder, and monitor the client for proper housecleaning of the folder in the future.


    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Thursday, January 02, 2014 7:19 PM
    Moderator
  • So I have read this post from top to bottom and agree with most things that were said.  With that said though, you always talk about an update agent being corrupt or the datastore being corrupt and not really giving any troubleshooting steps to fix either of them.  I work for a small company working on servers that are way beyond there retiring age but have to because we just can't spend the money every other year to replace them.  I have gone through about 6 of my servers now and everyone of them have the downloads folder with updates going back several years.  So I have been deleting the ones that are several years old and leaving the most current one.  I get updates all the time and rarely do have ones that are failing.  So I am not sure why the files are getting so big.  These servers were all built with 10GB max as the OS drive because that was all that was recommended at the time.  With the select few that i have virtualized, i have been able to give extra space to the OS partition.  The ones that I have not done is because the are mission critical and need to be up at all times.  

    I also understand that this is for IT Pros, but to talk to other professionals as if they were below you gets you little to no respect.  I almost started skipping the post that you made because of the comments that you made and the lack of humility that you have.  Show a little respect for some IT pros that are looking for answers, instead of just being told NO.  There are doctors that might be able to help take that claw out.  And if you still feel strongly about being condescending for those asking questions.  Find a new line of work were no one asks you questions!!

    Tuesday, March 25, 2014 7:05 PM
  • you always talk about an update agent being corrupt or the datastore being corrupt and not really giving any troubleshooting steps to fix either of them.

    Fair enough, Brad, but to be honest, there really aren't any "troubleshooting steps" per se. There are a couple of symptoms that will appear in a WindowsUpdate.log when that occurs, and the only known remediation is to delete the SoftwareDistribution folder and let the datastore and download cache be recreated.

    So I am not sure why the files are getting so big.

    There's not a lot of information available about how the WUA actually works internally, or how it should work. Most of what we know is based on several years of empirical observations.

    One observation that applies is that once the datastore and download cache get out of sync, the housekeeping routines don't delete anything. Deleting the files older than 10 days usually will restore normal functionality of that housekeeping task.

    If it doesn't, and space is that critical, you might also find it beneficial to rebuild the entire datastore.

    1. Save the ReportingEvents.log file.
    2. Stop the WUA service.
    3. Delete the SoftwareDistribution folder.
    4. Restart the WUA service and restore the ReportingEvents.log file.

    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    Tuesday, March 25, 2014 10:46 PM
    Moderator
  • Hi
    I have windows server 2008 r2
    I have been gathering information about delete C:\Windows\SoftwareDistribution\Download. I have read that there won't be any problem if I delete the content of Download Folders, also found that I won't be able any more to rollback updates, is that right?

    Thanks



    LauraJ

    Saturday, April 05, 2014 2:50 PM
  • I have read that there won't be any problem if I delete the content of Download Folders
    Generally this is correct.
    also found that I won't be able any more to rollback updates, is that right?
    No. The ~\SoftwareDistribution\Download folder has absolutely nothing to do with the ability to rollback updates. Rolling back an update is a function of the specific operating system involved. This ~\Download folder is just a temporary holding place for update files waiting to be installed, and on a healthy system (as noted above) should be automatically deleted from that folder ten days after successful installation of the update.

    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, April 07, 2014 3:10 PM
    Moderator
  • I like hearing there is NO reason on a normally functionning system to fiddle with the software distributions download folder... How about getting rid of around 20gigs of useless data since they already have been installed ?? In my case i have 120gb SSD drive, so 20gigs is already more than 10% the drive size and is enough to install 2 more games or a bunch of programs and still have some room to breathe on the disc... and also, if you have to scan for viruses, or even recovery of data that has been deleted by accident, flushing this folder will speed up the whole process and make ALOT less stuff to scan. And i know this part doesn't really fit into the "properly functioning system" part even if it has no real problems other than having corrupted update before installation, but i've seen SOOOO many cases of corrupted download on brand new and/or freshly formatted machines that require the download cache to be wiped clean to stop the never ending loop of failed updates, not to mention the marvelous win 8 and 8.1 updates that don't even pass the UEFI security and are rejected by the computer, causing an endless reboot loop also, and so forth... So quite frankly i find there are numerous reasons to flush the WU download cache, even on a perfectly good and working machine. And if WU agent maintains this directory, it's not doing a very good job since it never cleans it up for any reason and winds up taking over 10 to 20gb in most cases, specially after doing a clean install and putting in all the updates available... even a few years down the road all the cache is still there and taking up usefull space by the tons... I understand that deleting the WHOLE softwaredistribution folder is excessive, but the download directory itself is another story... What you just said at the start of this post is about the same as saying if a car engine runs fine, don't change the oil in it, there's no reason to do so the engine takes care of maintaining the oil itself... It's just not true and just won't handle itself even in a million years, just like the download folder... especially that there is NO reason whatsoever to keep the downloaded packages after they are installed, since even if you roll back your system or whatever, you will still need to reinstall the updates and in most cases the roll back will have flushed the updates from the download folder and you will need to redownload and install them anywayz... So i don't want to be rude, but it's not because YOU don't see any use in it that there isn't any.
    Sunday, July 06, 2014 9:51 PM
  • How about getting rid of around 20gigs of useless data since they already have been installed ??

    As stated elsewhere dozens of times, if there is any data in the ~\Download folder that is >10 days old, feel free to delete it at will.

    and also, if you have to scan for viruses

    The ~\Download folder should be excluded from all AV/AM scans, for two reasons:

    • Because the content in this folder is already validated by SHA hashes on the files, and
    • Because there are numerous recorded instances of AV/AM software interfering with update installations that are executed from this folder tree.

    But I've seen SOOOO many cases of corrupted downloads on brand new and/or freshly formatted machines that require the download cache to be wiped clean to stop the never ending loop of failed updates.

    Really!? I'd like to investigate this more in-depth; personally I've never seen an instance where corrupted data is written to the ~\Download folder, because corrupted files would fail the SHA tests performed by the WUA prior to accepting the file from BITS and never be written to the ~\Download folder. They'd also result in a FILE SAVE error being logged to the WindowsUpdate.log.
    not to mention the marvelous win 8 and 8.1 updates that don't even pass the UEFI security and are rejected by the computer
    Couldn't comment on this; haven't heard of this issue before either, but if you have documentable evidence, sharing it with the community would be most helpful.
    So quite frankly i find there are numerous reasons to flush the WU download cache, even on a perfectly good and working machine.
    And you're entitled to your views and opinions, but flushing the ~\Download folder won't do much good if [a] the SOURCE of the file is defective, or [b] the NETWORK is corrupting the file in transmission.
    And if WU agent maintains this directory, it's not doing a very good job since it never cleans it up for any reason and winds up taking over 10 to 20gb in most cases
    This is not an accurate statement, but where humans have interefered with this process (such as often happens with the "fixes-everything" solution of deleting the SoftwareDistribution folder), or improperly deleting ALL of the contents of the folder -- that will definitely confuse the state data maintained in the datastore that the WUA relies on.
    What you just said at the start of this post is about the same as saying if a car engine runs fine, don't change the oil in it, there's no reason to do so the engine takes care of maintaining the oil itself...
    Uhhh.. I don't think that's quite what I said.


    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, July 07, 2014 3:55 AM
    Moderator
  • you always talk about an update agent being corrupt or the datastore being corrupt and not really giving any troubleshooting steps to fix either of them.

    Fair enough, Brad, but to be honest, there really aren't any "troubleshooting steps" per se. There are a couple of symptoms that will appear in a WindowsUpdate.log when that occurs, and the only known remediation is to delete the SoftwareDistribution folder and let the datastore and download cache be recreated.

    So I am not sure why the files are getting so big.

    There's not a lot of information available about how the WUA actually works internally, or how it should work. Most of what we know is based on several years of empirical observations.

    One observation that applies is that once the datastore and download cache get out of sync, the housekeeping routines don't delete anything. Deleting the files older than 10 days usually will restore normal functionality of that housekeeping task.

    If it doesn't, and space is that critical, you might also find it beneficial to rebuild the entire datastore.

    1. Save the ReportingEvents.log file.
    2. Stop the WUA service.
    3. Delete the SoftwareDistribution folder.
    4. Restart the WUA service and restore the ReportingEvents.log file.

    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.



    How in the world am I suppose to

    'restore the ReportingEvents.log file',

    briefly mentioned above ?? ?

    I cannot

    Delete the new one because

    'the application is open in Application Information (???);

    Close the file, & try again.'.

    I cannot

    Paste, & Replace with the old one, because

    I 'need Administrator Permission'  [I am 'Administrator' ?], &

    'the folder, or a file in it, is open in another program' (??).

    And I cannot

    simply Paste the contents of the old log into the new log, because

    'Access is Denied'.

    I am using W7 64-bit.

    Windows updated the Windows Update software just the other day, & then

    it stopped working, &

    I have tried many other published solutions

    to no avail.

    Please focus on

    elaborate, complete, & effective solutions rather than

    all of the useless posturing, & bickering

    that is above;

    Windows users already have enough problems to have to deal with .. .

    Thank You,

    JKB

    I reposted this to a more appropriate forum: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_update/how-do-i-reset-windows-updates-software/c7705313-79d2-4681-8efe-db6eb7db0756?tm=1409258370242

    • Edited by JKB 101 Thursday, August 28, 2014 8:48 PM
    Thursday, August 28, 2014 7:20 PM
  • How in the world am I suppose to

    'restore the ReportingEvents.log file',

    briefly mentioned above ?? ?

    Great question. Let's rewrite the procedure, shall we:

    • Save the ReportingEvents.log file:
      • COPY %WINDIR%\SoftwareDistribution\ReportingEvents.log %TEMP%
    • Stop the WUA service.
    • Delete the SoftwareDistribution folder.
    • Restart the WUA service
    • Restore the ReportingEvents.log file:
      • COPY %TEMP%\ReportingEvents.log %WINDIR%\SoftwareDistribution

    Does that help?


    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Friday, August 29, 2014 12:27 AM
    Moderator
  • Thank you for replying.

    I had already done your 4 straightforward steps -
    except 4b ('restoring the log file').

    I did a simple Copy of that log file (233kb) to the Desktop which
    appeared to work, but
    all of my attempts to restore it with a simple Paste (described above) refuse to work.

    Do you mean that
    I should have been using
    both of these commands that you are showing now (above) in
    the black terminal, at the prompt -
    perhaps with elevated privelages -
    to Copy, & to Paste
    (instead of a simple Copy, & Paste) ?? ?

    If so,
    will the log file I had already copied with a simple Copy to the Desktop
    still work with
    your 2nd command ?


    Please elaborate.

    Thank You,
    JKB

    Friday, August 29, 2014 2:51 AM
  • If so, will the log file I had already copied with a simple Copy to the Desktop still work with
    your 2nd command ?

    It should.

    If it freaks out, it could be that the WUA has the file locked. Stop the WindowsUpdate service, copy the logfile back, and restart the service.

    There's no difference between using COPY or ROBOCOPY. I just use ROBOCOPY in my examples because it's the de facto super-tool now available with Windows.


    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    Sunday, August 31, 2014 1:14 AM
    Moderator