Huge CBS Log files

If there’s some problem with Windows Updates (or it can be due to other reasons too), the CBS log file can grow faster than it’s rotated and after a while it can’t be rotated.

The log files are under C:\Windows\Logs\CBS.

Both CBS.log and any uncompressed log files can be hold by the Trusted Installer service preventing deletion. So, to clean up safely:

net stop TrustedInstaller
del C:\Windows\Logs\CBS\CBS*.log
net start TrustedInstaller