How to Fix Component-Based Servicing (cbs.log) using Excessive Disk Space

Component-Based Servicing (cbs.log) may start consuming all the drive space if the system files are corrupt or if a Windows update is continuously failing to install. The issue arises when the user sees his system drive to be filled (or a large chunk of the drive is occupied) by the CBS logs. But after deleting the files, the logs again rapidly grow in the size.

Component-Based Servicing (cbs.log) causes all drive space to be consumed

Before moving on to reduce the size of your CBS log, make sure to reset the file association to the defaults (Settings > Apps > Default Apps > Reset to Microsoft Recommended Defaults).

Reset to the Microsoft Recommended Defaults

Solution 1: Delete the CBS Log Files

The CBS log files are split into different files once a file reaches 50 MB and then compressed to save the disk space. But the issue arises when a CBS log file (due to a glitch) grows to 2 GB in the size (after which the Makecab cannot compress it) and the file size starts to grow rapidly. In this context, deleting the CBS files may solve the problem.

  1. Click Windows, type: Services, and right-click on it. Then select Run as Administrator.
    Open Services as Administrator
  2. Now right-click on the Windows Update service and in the menu shown, choose Stop.
    Stop the Windows Update Service
  3. Then repeat the same to stop the Windows Modules Installer service (if you cannot disable the Windows Modules Installer service, then try the method mentioned at the end of this solution).
    Stop the Windows Modules Installer Service
  4. Then right-click Windows and select the Task Manager.
  5. Now right-click on Windows Modules Installer (if present) and select End Task.
  6. Then head to the Details tab and right-click the TiWorker.exe.
    End the Task of TiWorker.Exe and TrustedInstaller in the Details Tab
  7. Now select End Task and then end the task of the TrustedInstaller.exe in the Details tab.
  8. Then navigate to the following path (copy-paste the address):
    \Windows\Logs\CBS
    Delete the CBS Logs
  9. Now delete all the files in the CBS folder and head to the following temp folder:
    \windows\temp\
    Delete the Contents of the Windows Temp Folder
  10. Then delete all the files in the Temp folder (you may have to take ownership of some files) and after that, make sure to empty the Recycle Bin.
  11. Now start the Windows Modules Installer and Windows Update service (steps 1 to 3).
  12. Then check the Windows temp folder (step 9) again and if it shows any of the files, delete those files as well.
  13. Now again empty the Recycle Bin and shut down the PC.
  14. Wait for one minute and then power on the system.
  15. Upon system’s boot, check if the CBS.log issue is resolved.

If you cannot stop the Windows Modules Installer, then try the method below:

  1. ClickWindows, type: Command Prompt, right-click on Command Prompt and choose Run as Administrator.
    Open Command Prompt as Administrator
  2. Now execute the following:
    net stop TrustedInstaller
    Stop the TrustedInstaller Service Through the Command Prompt
  3. If it is successful, then try steps 4-15 to delete the CBS.log, and if the above-command fails, then execute the following one by one:
    sc qc TrustedInstaller
    
    tasklist | find /i "TrustedInstaller.exe"
    
    taskkill /f /im "TrustedInstaller.exe"
    End the TrustedInstaller.Exe Through the Task Manager
  4. Then try steps 4-15 to delete the CBS.log files and check if that resolves the drive space issue.

Solution 2: Perform an SFC Scan

The CBS.log issue may arise if the essential system files are corrupt. In this context, performing an SFC scan may clear the files’ corruption and thus solve the problem.

  1. Firstly, shut down your PC and wait for one minute.
  2. Then power on the system and perform an SFC scan.
    Perform an SFC Scan
  3. Once the scan is complete, check if the CBS.log is back to the normal size. If not, then delete the CBS.log (as discussed in solution 1) and check if that resolves the Component-Bases Servicing issue.

Solution 3: Manually Perform the Offline Update

The CBS.log may have consumed a large chunk of the drive space if an update is continuously failing to install and repeated retrying may cause the rapid growth of the CBS file. In this case, manually installing the offline update may clear the glitch and thus solve the problem.

  1. Right-click Windows and open Settings.
  2. Now select Update & Security and in the right pane, open the Advanced Options.
    Open Update & Security
  3. Then expand the dropdown of Pause Updates and select a date.
    Open Advanced Update Options
  4. Now make sure to completely close all the applications (so no application is writing to the system’s storage drive) and press the power button till the system is powered off (do not shut down or restart). Then power on the system.
    Pause Windows Updates
  5. Upon system’s boot, launch a web browser and open the Windows 10 download page of the Microsoft website.
  6. Now click on the Update Now button for the latest update (e.g., Windows 10 October 2020 Update) and let the download complete.
    Click on the Update Now in the Windows 10 Download Page
  7. Then launch the downloaded file as administrator and follow the prompts to install the update.
  8. Once the installation is complete, reboot your PC and upon reboot, steer to the Microsoft Update Catalog.
    Search and Download the Latest KB Update from the Update Catalog Website
  9. Now download the latest KB updates for your system (you may search the internet to find the KB number of the latest updates for your system).
  10. Then install the update as administrator by following the prompts to complete the installation.
  11. Now reboot your PC and delete the CBS.log (as discussed in solution 1).
  12. Then disable the pause updates option (by repeating steps 1 to 3) and check if the CBS drive issue is resolved.

Solution 4: Use the Task Scheduler to Delete the CBS Log Files

If the above solutions did not do the trick for you, then you may create a repeated task in the Task Scheduler to delete the CBS log files, which will stop the consumption of the drive space by the CBS logs and thus solve the problem.

  1. Click Windows, type: Notepad, and then open it.
  2. Now copy-paste the following lines to the Notepad:
    net stop “TrustedInstaller”
    
    del /S c:\windows\logs\cbs\*.log
    
    net start “TrustedInstaller”
    Create the Batch File to Delete the CBS Logs
  3. Then expand the File menu and choose Save.
  4. Now change the file type to All Files and name the file with a .bat extension (e.g., DeleteCBSLog.bat).
    Save the Batch File
  5. After that, in the Save as dialogue box, head to the directory where you want to save the file (e.g., Desktop).
  6. Now click on Save and close the Notepad.
  7. Now click Windows, type: Task Scheduler, and then open it.
    Open the Task Scheduler
  8. Then expand the Action menu and choose Create Task.
    Create Task in the Task Scheduler
  9. Now enter the name of the task (e.g., DeleteCBSLogs) and checkmark Run with Highest Privileges.
    Create the Delete the CBS Log Task in the Task Scheduler
  10. Then head to the Triggers tab and click on the New button.
    Create a New Trigger for the Task
  11. Now select Daily and click on the OK button.
    Set the New Trigger to Daily
  12. Then head to the Actions tab and click on the New button.
    Create a New Action in the Task Scheduler
  13. Now click on Browse (in front of Program/Scrip) and head to the directory where the .bat file is located (e.g., Desktop).
    Click Browse in the New Action Window
  14. Then double-click on the batch file (e.g., DeleteCBSLogs) and head to the Settings tab.
    Double-click on the Batch File
  15. Now checkmark “If the Task Fails, Restart Every“, and set the dropdown to 1 Hour.
  16. Then uncheck the box of “Stop the Task if it Runs Longer Than”, and click on the OK button.
    Check the Task Fails and Uncheck the Stop the Task in the Task Scheduler
  17. Now delete the CBS Logs (as discussed in solution 1) and reboot your device to check if the CBS.log issue is resolved.

Solution 5: Edit the System’s Registry to Stop the Creation of CBS Log Files

If none of the solutions did the trick for you, then editing the system’s registry to disable the CBS log may solve the problem (keep in mind to enable the setting once the issue is reported to be solved).

Warning: Advance with extreme care and at your own risk as editing the system’s registry is a skillful job and if not done properly, you may cause everlasting damage to your PC/data.

  1. Click Windows, type: Registry Editor, and right-click on it. Then select Run as Administrator.
  2. Now navigate to the following path:
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing
  3. Then double-click on EnableLog and set its value to 0 (you may have to take ownership of the registry key).
    Set the EnableLog Value to 0
  4. Now exit the editor and delete the current CBS logs as discussed in solution 1.
  5. Then reboot your PC and check if the CBS.log issue is resolved.

If the issue persists, then you may try a 3rd party cleaning utility to check if that clears out the CBS.log issue.

Kevin Arrows


Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Fix Component-Based Servicing (cbs.log) using Excessive Disk Space

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested