CAB files found in Windows Temp folder [Complete fix]

Matthew Adams
by Matthew Adams
Windows & Software Expert
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 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. 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 set 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
PRTG Network Monitor

PRTG Network Monitor

Manage all the CAB files from your temp folders easily by using this automated tool.
Free trialVisit website

2. 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


3. 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
    runas>nul
    echo Removing archives Temp...
    del /f C:WindowsTemp*.*
    echo Fixing Windows!!!
    del /f C:WindowsLogsCBS*.log
    echo Done!
    pause
  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.

4. 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
    c:
    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:

C:WindowsLogsCBS

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.


5. 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.

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:

Frequently Asked Questions

  • CAB files are cabinet data files for Windows operations, such as installing updates.

  • Yes, it’s entirely safe to erase temporary CAB files within the Windows Temp folder.

  • You can open and view CAB files by right-clicking them and selecting Open on File Explorer’s context menu. Our Extract CAB article provides details on how to extract CAB files.

There are no comments yet. Please leave a comment

add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *