How To Safely Cleanup The SoftwareDistribution Folder

“SoftwareDistribution” is a directory in the Windows operating system that temporarily stores the Windows Update files before installing them on your system. However, occasionally, the files don’t always get deleted from the SoftwareDistribution folder.

They either get left behind, gradually taking up more and more space on the hard drive, or cause issues for the newer Windows updates to install.

Either way, there may come a time when you will need to manually clear out this folder and make space for new files. But is safe to do so, or will it corrupt your operating system?

In this article, we discuss whether or not it is safe to clean up the SoftwareDistribution folder, and if it is, how to do it?

What is the SoftwareDistribution Folder

As mentioned earlier, the SoftwareDistribution folder stores Windows Update files temporarily. This folder can be found at the following path:

C:\Windows\SoftwareDistribution

It has the following subdirectories and files:

  • DataStore
  • Download
  • PostRebootEventCache.V2
  • SLS
  • ReportingEvents.txt
SoftwareDistribution folder
SoftwareDistribution folder

The SoftwareDistribution folder is automatically managed by the Windows Update Agent (WUAgent), therefore it does not need any external involvement. However, you may need to interfere when there is something wrong with it.

Is it Safe to Cleanup the SoftwareDistributon Folder

Although it is recommended to stay clear of the SoftwareDistribution folder, one may need to clean it up from time to time, when needed.

The SoftwareDistriution folder stores temporary files for Windows Updates and other hotfixes. These are usually downloaded through Windows Update. If you remove them, then they will be downloaded again. Therefore, it is safe to clean up the SoftwareDistribution folder.

That said, there are a few caveats about cleaning up the aforementioned folder which you should be intimated about beforehand.

If you clean the SoftwareDistribution folder, you will lose all history data of the recently-installed Windows updates. This will then make pinpointing a problematic update difficult.

Moreover, it will take longer and more bandwidth to re-download all the required files for the updates, since the WUAgent will need to recreate the Datastore directory information.

Other than that, it is completely safe to clear out the SoftwareDistribution folder.

If you are still having second thoughts about the operating system’s safety and reliability, then we suggest that you create a system restore point before proceeding with the cleanup, or, you can adapt the SoftwareDistribution folder renaming method instead of deleting it.

When Should You Cleanup SoftwareDistribution Folder

As we mentioned earlier, it is recommended to steer clear of the SoftwareDistribution folder and only manipulate it when absolutely necessary. Therefore, do not rename or delete it without a reason.

You can clean up the SoftwareDistribution folder if you are experiencing an issue with Windows updates. For example, if an update is getting stuck, or won’t install at all. You can also do so when you encounter an error code relating to Windows updates, like error code 0x80070424. Or any other issue with Windows Update.

Now that you understand what the SoftwareDistribution folder is about, when to clean it out, and that it’s safe to do so, let us show you 2 safe methods to clean up the SoftwareDistribution folder.

How to Rename the SoftwareDistribution Folder

The safest approach is to simply rename the default SoftwareDistribution folder. When you rename it, Windows will automatically create a fresh folder with new subdirectories and files.

Moreover, this way, you can always restore the old folder if needed. However, it will not resolve the issue of a large SoftwareDistribution folder and clear out any disk space. Therefore, this method can only be applied if you have sufficient available disk space.

Since the SoftwareDistribution folder is being utilized by the “Windows Update” and the “Background Intelligent Transfer Service” services, these 2 will first need to be stopped.

Follow these steps to successfully rename the SoftwareDistribution folder:

  1. Launch an elevated Command Prompt.

  2. Run the following cmdlets to stop the “Windows Update” and the “Background Intelligent Transfer Service” services.

    Net Stop wuauserv
    Net Stop bits
    Stop dependent services
    Stop dependent services
  3. Now immediately run the following cmdlet to rename “SoftwareDistribution” to “SoftwareDistribution.old”.

    Rename %windir%\SoftwareDistribution SoftwareDistribution.old
    Rename the SoftwareDistibution folder
    Rename the SoftwareDistibution folder
  4. Now run the following cmdlets to start the stopped services.

    Net Start wuauserv
    Net Start bits
    Start the dependent services
    Start the dependent services

Now try reinstalling the Windows update (or whatever it was you were having trouble with) and see if the new, fresh SoftwareDistribution has helped in any way.

If this did not work for you, then always clean up the existing SoftwareDistribution folder using the steps given in the next section below.

How to Cleanup the SoftwareDistribution Folder

  1. Launch an elevated Command Prompt.

  2. Run the following cmdlets to stop the “Windows Update” and the “Background Intelligent Transfer Service” services.

    Net Stop wuauserv
    Net Stop bits
    Stop dependent services
    Stop dependent services

    Do not close the Command Prompt.

  3. Now navigate to the following path using File Explorer:

    C:\Windows\SoftwareDistribution
  4. Select everything by pressing the CTRL + A hotkeys, and then click Delete.

    Delete everything in SoftwareDistribution folder
    Delete everything in SoftwareDistribution folder

    Alternatively, you can also run the following cmdlet in Command Prompt to clear out the SoftwareDistribution folder silently:

    del c:\windows\SoftwareDistribution /q /s
  5. (Conditional) If asked for administrative permission, click Continue.

    Provide administrative privileges
    Provide administrative privileges
  6. Now run the following cmdlets in the Command Prompt to start the stopped services.

    Net Start wuauserv
    Net Start bits
    Start the dependent services
    Start the dependent services

You will now have a clean and good-as-new SoftwareDistribution folder for a fresh start.

Closing Thoughts

Although one does not usually need to make modifications to the SoftwareDistribution folder, we found that people are looking for automated methods to clean out the folder. Some recommendation that we saw was to delete the “Temporary Windows installation files” from the Windows Settings app.

Clear temporary Windows installation files
Clear temporary Windows installation files

Let us inform you that doing so will not clean up the SoftwareDistribution folder. It may free up some space on your hard drive, but it will simply remove the “Windows.old” folder, and have no effect on the SoftwareDistribution folder.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information