Windows – Disk Space Cleanup – Software Distribution and more …

Sometimes you run out of disk space on a PC or even a Server !!

Especially on the C drive this will become serious to keep everything running smoothly.

Apart from deleting the rubbish, you can follow this procedure to free up major disk space.

Follow this procedure to get rid of the overload in :


1. Is it safe to delete files in ?C:\WINDOWS\SoftwareDistribution\Download

Yes, taken in account you follow these steps :

net stop wuauserv
rename c:\windows\SoftwareDistribution Softwaredistribution.old
net start wuauserv

Verify that the new software distribution folder created when you restart the update service. You will notice it will create the missing subfolders again and populate ONLY the downloads that you are missing and not the whole historical downloads.

Restart the computer and del the folder if you have no issues.

Software Distributions 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.

This will save you a lot of Gb’s !!

If this is not sufficient you can apply this try to relocate the folder and all the Gb’s to a different drive.

How to relocating the C:\WINDOWS\SoftwareDistribution folder

1. First stop the Windows update Service


Copy the folder and files to a new drive with enough space like the “D drive” in my case


On the “C Drive” rename the original folder to


Delete all the subfolders and data from this folder (which had copied to the D drive see above)

Create a new blank C:\WINDOWS\SoftwareDistribution folder

Next create a Symbolic link using Junction  from this new blank folder in the C drive to the copied folder on the D drive.

You can use this tool if needed

junction "C:\WINDOWS\SoftwareDistribution" "D:\WINDOWS\SoftwareDistribution"



Tip :

The JUNCTION.EXE tool is not needed anymore ! In fact it is outdated compared to the built-in tool MKLINK.

As of Windows Server 2008r2 you better use this command line tool.


See here for the difference between /D and /J

net stop wuauserv
mklink /D "C:\WINDOWS\SoftwareDistribution" "E:\WINDOWS\SoftwareDistribution"
net start wuauserv


Keep in mind that the LINK Directory may not yet exists !

So you need to delete the C:\WINDOWS\SoftwareDistribution before creating the link.



Check the result after restarting Windows Updates Service again.

Use this command :

dir /AL /S C:\windows


Done !


2. Is it safe to delete the  WinSxS folder

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

Windows 7 / Windows 2008r2 use this command :

dism /online /cleanup-image /spsuperseded

Windows 10 / Windows 2016 use these commands :

dism /Online /Cleanup-Image /AnalyzeComponentStore


Windows 2016 Example


Next if cleanup recommended run this command

dism /online /Cleanup-Image /StartComponentCleanup


Also see here for more clean-up options :

System => Storage =>  Free Up space now …


Activate Storage Sense




See here for more info :

Then, cleaning up temp spaces, such as with Disk Clean-up helps.


Clean-up System Files


Ultimately remove some Restore Points



3. Resize DataStore.edb Database

Run these commands


net stop wuauserv
esentutl /k %windir%\softwaredistribution\datastore\datastore.edb
net start wuauserv


net stop wuauserv
esentutl /d %windir%\softwaredistribution\datastore\datastore.edb
net start wuauserv

Reducing Windows Database

Windows.edb is located here :



Change the Windows Search service so that it does not automatically start. To do this,

Run the following commands in cmd.exe using Admin privileges :


Run the following commands to perform offline compaction of the Windows.edb file:

Sc config wsearch start=disabled
esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb



Run the following command to change the Windows Search service to delayed start:

Sc config wsearch start=delayed-auto
net start wsearch




After Compacting it is save +/- 1 Gb Smile

You can do the same for the datastore.edb



net stop BITS
net stop wuauserv
esentutl.exe /d c:\Windows\SoftwareDistribution\DataStore\DataStore.edb
net start BITS
net start wuauserv

Actually you can do this for any EDB database you find on your system ! Winking smile

Like for example the Internet.edb


4. More tips on how to recover space is :

1. Windows – WSUS Database CleanUp Tool

2. Windows – Reading & Removing CBS.Log


Enjoy !

One Response to Windows – Disk Space Cleanup – Software Distribution and more …

  1. Superb, what a web site it is! This webpage presents helpful
    information to us, keep it up.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: