This Windows Bug May Have Accumulated Junk Files on Your PC
Are you still running Windows 7, 8, or 8.1? Then you might have noticed your available hard drive space steadily decreasing, even if you have not downloaded or added any new files to your system. This accumulation of junk files is a symptom of the log-file compression bug, a problem that Microsoft has known about for over two years.
While Microsoft hasn’t released anything officially, you can manually fix this bug and release your much needed hard drive space.
The Log-File Compression Bug
This is a known issue affecting the Trusted Installer CBS logs in Windows 7, 8, 8.1, and 2008 R2, as well as potentially existing in other versions too.
Thankfully, poster jwalker107 thoroughly described the symptoms of the bug on the Microsoft Answers forum:
I’ve had repeated instances where a Windows 7 x64 client runs out of hard drive space, and found that C:\Windows\TEMP is being consumed with hundreds of files with names following the pattern “cab_XXXX_X”, generally 100 MB each, and these files are constantly generated until the system runs out of space. Upon removing the files & rebooting, the files start being generated again.
I’ve found that this is caused by large Component-Based Servicing logs. These are stored at C:\Windows\Logs\CBS. The current log file is named “cbs.log”. When “cbs.log” reaches a certain size, a cleanup process renames the log to “CbsPersist_YYYYMMDDHHMMSS.log” and then attempts to compress it into a .cab file.
However, when the cbs.log reaches a size of 2 GB before that cleanup process compresses it, the file is too large to be handled by the makecab.exe utility. The log file is renamed to CbsPersist_date_time.log, but when the makecab process attempts to compress it the process fails (but only after consuming some 100 MB under \Windows\Temp). After this, the cleanup process runs repeatedly (approx every 20 minutes in my experience). The process fails every time, and also consumes a new ~ 100 MB in \Windows\Temp before dying. This is repeated until the system runs out of drive space.
When the system works correctly, the integrated CAB compression unit should compress the Trusted Installer CBS log before it reaches 2 GB. Unfortunately, the CAB cannot handle files larger than 2 GB and starts having a jolly bad time. As a result, the CAB compressor (
makecab.exe) generates a huge amount of useless and massively bloated TEMP files
, which will rapidly fill any hard drive.
It’s unclear why the log file is permitted to grow larger than 2 GB. Logging might happen too fast for the compression to keep up and the culprit here could be Windows Update . Once a log file has grown to 2 GB or more, it causes the compression tool to crash and enter a vicious circle, accumulating temporary junk files until the drive is full.
This bug is irritating and time-consuming, to say the least. And why Microsoft continues to eschew better compression tools is beyond me.
The Manual Fix
— Woody Leonhard (@woodyleonhard) August 25, 2016
Press Windows key + R to open the Run dialog. Type
services.msc to open the local services panel
Browse to down to the Windows Modules Installer and turn it off.
Now head to %rootdirectory% > Windows > Logs > CBS.
You’ll now need to move or rename each of the files in the directory. Depending on how many files are present, it may well be easier to move them all to a different directory.
Now head to %rootdirectory% > Windows > Temp.
In the top-right corner, enter
cab* and search. If there are any results, delete them.
Reboot your system.
You should now find your Windows Module Installer service up and running like normal, and
makecab.exe should be able to actually process the files, rather than repeatedly throwing up all over your hard drive.
Clean Your Windows Caches
If you’re running Windows 10 and have noticed your precious hard drive numbers slowly dropping, it could be one of the numerous caches accumulating data without you realizing.
We previously detailed how to go about finding and clearing each of the following caches , but I’ll list them just so you’re aware:
- Windows 10 Update cache
- Windows Store cache
- Temp Files cache
- Thumbnail cache
- System Restore cache
- Web Browser cache
- DNS cache
While clearing your DNS cache is really not going to grant you anything like the space clearing your Temp Files cache might, we also have some effective suggestions for how to free up some space .
Bug Free Existence
You should now have control of your hard drive once more, free from the grips of the errant
makecab.exe, and able to actually delete the offending files with spawning a billion more (trust me, I counted them).
How do you keep your system size down? Regularly empty your downloads folder? Delete anything other than what is necessary? Let us know your techniques below!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.