CAB files found in Windows Temp folder [Complete fix]

by Matthew Adams
Matthew Adams
Matthew Adams
Windows & Software Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things... read more
Affiliate Disclosure
  • CAB files in Windows’ Temp folder can regenerate because of a compression process bug. They can also accumulate on server PCs within network environments.
  • If you're wondering if you can delete CAB files in Windows Temp folders, there are some great third-party utilities available.
  • Users can fix CAB files regenerating in the Windows Temp folder in Windows 10 with Command Prompt and batch scripts.
  • Windows also include some handy built-in utilities for clearing and also to stop CAB files in the Windows Temp folder.


Windows’ Temp folder includes a repository of temporary files. That folder includes cached data and launch configurations for software. CAB-xxxx data files are among the ones that are amass in the Temp folder.

Many CAB files can accumulate and regenerate within the Temp folder. That’s especially the case for server PCs within network environments, which generate a lot of log and security data.

The accumulation of CAB files can waste a considerable amount of hard drive space.

There’s also a CAB compressor bug on Windows in which the makecab cleanup process fails to compress CBS logs.

When that issue arises, all, or most remaining hard drive space can be consumed by regenerating CAB files. One user said this in a Microsoft forum post:

I’ve had repeated instances where a Windows 7 x64 client runs out of hard drive space and found that C:WindowsTEMP is being consumed with hundreds of files.

How can I clear CAB files and fix the compressor bug?

1. Erase CAB files with a CCleaner

For erasing masses of CAB files, look no further than CCleaner. That’s one of the most efficient and comprehensive disk cleanup utilities for Windows.

Its users can select the Temporary Files checkbox within CCleaner’s disk cleaner utility to quickly clear the Temp folder.

CCleaner includes numerous other handy system maintenance tools. Its users can repair PCs’ registries with CCleaner’s registry cleaner.

This software also has a handy Health Check feature, which is an all-in-one system optimization tool.

Other useful CCleaner features

  • It includes a startup manager for disabling startup programs
  • CCleaner’s disk analyzer provides a handy drive storage overview
  • Users can find and erase file duplicates with CCleaner’s duplicate file eraser utility
  • The Browser Plugins tab in CCleaner enables users to disable/enable browser add-ons

Get CCleaner

2. Set up a batch file to delete CAB and LOG files

  1. Press the Windows and S keyboard keys at the same time to open a search box.
  2. Input Notepad in the search box.
  3. Then click Notepad to open that text editor.
  4. Copy the batch file code below by pressing the Ctrl and C hotkey:
    @echo off
    echo Removing archives Temp...
    del /f C:WindowsTemp*.*
    echo Fixing Windows!!!
    del /f C:WindowsLogsCBS*.log
    echo Done!
  5. Paste that batch file into Notepad with the Ctrl + V hotkey.
    Batch file cab files in windows temp
  6. Click the File > Save as option.
  7. Select All Files on the Save as type drop-down menu.
    Save As window cab files in windows temp
  8. Enter Delete cab files.bat as the file title.
  9. Select to save the file to desktop.
  10. Click the Save button to confirm.
  11. Right-click the batch file on the desktop and select Run administrator to start it.

3. Run a Command Prompt script to clear CAB files and fix the compressor bug

  1. Open Windows’ search tool.
  2. Enter cmd in the search box that opens.
  3. Right-click within the Command Prompt utility to select the Run as administrator option for it.
    Run as administrator option cab files in windows temp
  4. Copy the Command Prompt script below with the Ctrl + C hotkey:
    net stop wuauserv
    cd %systemroot%
    rename SoftwareDistribution SoftwareDistribution.old
    rmdir /q /s c:windowstemp
    net stop trustedinstaller
    cd c:windowslogsCBS
    del *.cab
    del *.log
    rem regenerate cab files
    c:windowssystem32wuauclt.exe /detectnow
    net start wuauserv
    echo this is a dummy line
  5. Then right-click within the middle of the Command Prompt to both paste and execute the above script. You don’t need to press the Enter key to initiate it.

Note: You can apply the same fix manually by disabling the Windows Modules Installer module (via the Services window) and deleting the oldest Cbspersist_XX.log file in this folder:


Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

After deleting the oldest Cbspersist LOG file, erase all the CAB files from the Windows > Temp folder. Then restart the Windows Modules Installer within the Services window.

4. Turn on Storage Sense

  1. Type Storage Sense within the Windows search box.
  2. Click Turn on Storage Sense to open the window directly below.
    The Storage tab cab files in windows temp
  3. Click the Configure Storage sense or run it now option.
    Storage Sense option cab files in windows temp
  4. Toggle the Storage Sense option to On.
  5. Right-click the batch file on the desktop and select Run administrator to run it.

5. Check out PRTG Network Monitor

PRTG Network Monitor is ideal for users who need to monitor CAB files accumulating on server PCs within network environments.

You can use this powerful software to create an alert that notifies you if a server that hosts an Additional Polling Engine slows down, and sets the node warning level.

This will ensure that you will always know in time if the CAB files will be accumulating in the Temp Folder.

PRTG is freely available network-monitoring software. That software incorporates VMware, printer, database, and website monitoring components.

Paessler PRTG also includes WMI Free Disk Space and Folder, sensor monitors. Those components enable users to set up sensors that monitor whole disk drives or folders.

Folder sensor monitoring can come in handy for monitoring CAB file accumulation in the Temp folder and that folder’s overall size.

Other useful PRTG Network Monitor features

  • Incorporates more than 10 built-in technologies for flexible alerting
  • Its users can utilize PRTG within browsers or with its desktop app
  • PRTG’s map designer enables users to set up real-time maps for networks
  • The PRTG remove probes enable users to monitor networks in different locations

The PRTG network monitoring software is simple to set up and manage. The Importance of Network Monitoring is essential for your business.

Its primary aim is to monitor the traffic and performance of your computer network, as well as to look for sluggish or malfunctioning systems. This solution will save a lot of money and eliminate a lot of challenges.

 Get PRTG Network Monitor

So, that’s how you can delete CAB files in the Temp folder and resolve the compressor bug issue that regenerates them to free up disk space.

However, make sure you only delete CAB files within the Temp folder. Our Free up Hard Disk Space guide provides further tips for cleaning hard drives.

This article covers:Topics: