,Cab files - .log files

Italiabella
Italiabella used Ask the Experts™
on
Hello everyone,

I am trying to reduce the size of my full hard drive.
Can i delete all the .cab files and .log files i find inside C:/Windows/Logs/CBS ?

We are using Windows 7

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Tahir QureshiSystem Analyst
Commented:
Hi,
 
The CbsPersist logs are only useful to diagnose problems related with Windows Updates and the Component Store, my suggestion is to remove all the old logs except the last one.
 
Usually Windows compress the log's into cab format to save space but it seems it can fail if the logs are big (> 2GB), if there isn't enough free space, etc.

Author

Commented:
just to be sure when you say except the last one you mean the last one by date that has been created ?
Tahir QureshiSystem Analyst

Commented:
Yes....
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Developer
Fellow 2017
Most Valuable Expert 2018
Commented:
Hi Italiabella,

There are tons of reports on the web about CBS logs getting extremely large — some claim that the CBS folder (c:\Windows\Logs\CBS\) is more than 100GB! When the CBS.log file itself gets too big, Windows archives it into a file with the name CbsPersist_YYYYMMDDhhmmss.log and then can even pack those CbsPersist files into a CbsPersist_YYYYMMDDhhmmss.cab file.

If you're looking for a quick, bottom line answer, my personal experience, which is consistent with advice that I've read on the web, is that you may safely delete the CbsPersist files — both the .log files and the .cab files. But do not delete the current CBS.log file. You may also choose to retain one or a few of the more recent CbsPersist_YYYYMMDDhhmmss.log files (I do that when I delete them).

There are numerous discussions on the web about why this happens in the first place — the CBS logs are not supposed to become huge. There are many ideas on how to stop this from happening — I have not tried any of those ideas myself, so I cannot give my personal endorsement on any of them (some of them sound dicey/iffy). A common suggestion is the classic sfc /scannow, which is safe, but rarely reported as working. So far I've been content to delete them when the CBS folder gets too big.

If you want to understand more about this issue and what the CBS logs are used for, a web search for "cbs logs" (and variants like "delete cbs logs", "large cbs logs", etc.) will give you plenty to study. Regards, Joe
RaminTechnical Advisor
Commented:
Yes you can,
they would be useful only for troubleshooting issues. If you are sure your system is running fine, you can delete them. SFC.exe will create a new one, next time it is run.

to do this:

Create a System Image Backup from  Drive (C:).
Disable TrustedInstaller.exe (Windows Module Installer) in Taskmanager Services
Delete all the .log  .persist and .cab files in the C:\Windows\Logs\ CBS directory,
Enable TrustedInstaller.exe again
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018

Commented:
Hi Italiabella,

The suggestion that Ramin posted is one of those numerous discussions that I alluded to in my previous post. Here's an InfoWorld article with additional info about that particular idea:
http://www.infoworld.com/article/3112358/microsoft-windows/windows-7-log-file-compression-bug-can-fill-up-your-hard-drive.html

Note the link in that article to the interesting Windows forum discussion on it. Also note the comment, "There are incorrect solutions to the problem all over the web", which I think is worth taking into account.

A couple of other interesting threads are Why is CBS.log file size 20 GB and Understanding Component-Based Servicing. Of course, there's a lot more, which is why I suggested a web search earlier, if you want to learn more about it. Regards, Joe

Author

Commented:
DARN so much info about this issue. I will start today shrinking  only of the C:/windows/temp file. and leaving alone for now the CBS file.
thank you everyone.
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018

Commented:
OK, but if you have some old, big CbsPersist files, that would be a good place to start the clean-up. Btw, you may want to keep an eye on this question that was posted today:
https://www.experts-exchange.com/questions/29011495/Windows-7-temp-directory-filling-up-with-CAB-files.html
Regards, Joe

Author

Commented:
Hello Everyone and sorry for the delay. I finally deleted all the temp freeing up 70GB of space. The computer works great and no issues whatsoever. I didn't touched the CBS folder.

Thank you again.
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018

Commented:
> freeing up 70GB of space

Very nice! You're welcome — and thanks to you for posting your results. When you need more space, delete the old CBS logs — won't be a problem. Regards, Joe

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial