Windows Disk Space

Chances are you have run out of space on your drive and want more free space. The first thing to do is run the following:
cleanmgr /D C where /D means "here comes a drive letter" and C is that drive letter
This is the standard Windows disk cleanup utility, so always a good place to start.

My next step is usually to run WinDirStat - Windows Directory Statistics because it does a brilliant job of helping you pinpoint the problem. There is an alternative version of this at ariccio/altWinDirStat: An unofficial modification of WinDirStat. Whether that is a directory or file type. I usually execute one of the things below and use "Refresh Selected" in WinDirStat to see how much improvement was made.


If you find C:\Windows\SoftwareDistribution\DataStore\DataStore.edb is big then it can help to defragment it, I saved a few hundred megabytes this way. You can delete the file but it will just get recreated by the Windows Update process, so open a Command Prompt and do this:
net stop wuauserv
net stop bits
esentutl.exe /d C:\Windows\SoftwareDistribution\DataStore\DataStore.edb
net start bits
net start wuauserv

Microsoft Teams

At present it seems that Microsoft Teams updates by downloading a new version and then switching the directories round. Usually you will find a "current" and a "previous" directory. From what I have seen, it is safe to delete "previous" directory, which can be found in the following location:
As you might expect, you do this at your own risk!

Skype for Business

From a process and directory point of view, this is still "Lync". Even with logging turned of I found that Skype had generated a lot of ".etl" event logging files. To remove these and reduce its disk usage I did the following:

  • Sign out of Skype
  • Delete the sign-in information
  • Exit Skype
  • Delete all the files from C:\Users\<username>\AppData\Local\Microsoft\Office\16.0\Lync\Tracing but not the directories
  • Start Skype
This was the easy way to remove all the caches profile pictures and everything else.

CBS Directory

I recently hit a problem with disk space and found a lot of space being taken by C:\Windows\Logs\CBS, this seems to be a reasonably common problem. Simply do the following:

  • Stop the "Windows Modules Installer" service, or kill TrustedInstaller.exe
  • Delete or Move the contents on C:\Windows\Logs\CBS
  • Start the "Windows Modules Installer" service

Windows Identity

It is not completely clear what this is for, however clearing the directory has not caused any issues, so navigate to the following:
Where you can then delete all the files.

Indexing Service

I have found that the Indexing Service makes a rather large file called C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb, which on a small C: drive can causes issues. To move it to the D: drive or another location just go into "Indexing Options" in the Control Panel, click "Advanced" and then set a new location. After a couple of minutes it will be moved. Nice and simple!

Moving Directories

The easiest way to move things to create space is to either uninstall and re-install the application or change its configuration to put the data in another location or rather on another drive. Sometimes though, this is not possible and in these cases I have found moving the files and then adding a Directory Junction to be a good option and hence I have published a script to do this, see:
windows/batch/relocate.cmd · master · Geoff Lawrence / Geoff Does Stuff · GitLab