Jump to content

Script to empty SoftwareDistribution Folder. Clear out Windows updates.


Brandan

Recommended Posts

Here is a Batch script to empty the SoftwareDistribution Folder.  It stops any installer processes in the background, temporarily disables the Windows Update Service, deletes everything in the Software Distribution folder then sets the Windows update service back to automatic and starts the service.

@echo off
CD C:\
taskkill /F /im setup.exe
taskkill /F /im ose00000.exe
taskkill /F /im msiexec.exe

sc config wuauserv start= disabled
net stop wuauserv

PowerShell.exe Remove-Item C:\Windows\SoftwareDistribution\* -Force -Recurse

sc config wuauserv start= demand
net start wuauserv

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...