The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,319 other followers

Why I love choco-cleaner for chocolatey

Posted by jpluimers on 2021/04/05

A while ago, I wrote about Installing Windows software with Chocolatey: a few notes and A choco install list, mentioned choco-cleaner in both (see first quote below) but forgot to show where this excels.

This is what I wrote:

since there is no choco cleanup yet [WayBack] you need to either:

If you want to clean cruft:

choco install --yes choco-cleaner

It helps a lot for situations where chocolatey updates a package, but you still have the old software running. In that case, the old version will be in %ProgramData%\chocolatey\lib-bkp, potentially taking up a lot of disk space.

This happed to me for instance when still having Process Explorer open while upgrading.

This is what happened:

 ShimGen has successfully created a shim for ZoomIt.exe
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Toegang tot het pad procexp.exe is geweigerd.
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Toegang tot het pad procexp.exe is geweigerd.
Maximum tries of 3 reached. Throwing error.
Attempted to remove 'C:\ProgramData\chocolatey\lib-bkp\sysinternals' but had an error::
 Toegang tot het pad procexp.exe is geweigerd.
 The upgrade of sysinternals was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\sysinternals\tools'

Chocolatey upgraded 1/21 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Upgraded:
 - sysinternals v2019.3.18

C:\>C:\ProgramData\chocolatey\lib\choco-cleaner\tools\choco-cleaner-manual.bat
Choco-Cleaner.ps1 v0.0.5.2 (01/09/2019) - deletes unnecessary residual Chocolatey files to free up disk space
Copyleft 2017-2019 Bill Curran (bcurran3@yahoo.com) - free for personal and commercial use
Choco-Cleaner Summary:
  **  Deleting unnecessary Chocolatey _processed.txt (WTF?) file...
  **  Deleting unnecessary Chocolatey .ignore files...
  **  Deleting unnecessary Chocolatey .old files...
  **  Deleting unnecessary Chocolatey cache files...
  **  Deleting unnecessary Chocolatey config backup files...
  **  Deleting unnecessary Chocolatey lib-bad package files...
  **  Deleting unnecessary Chocolatey lib-bkp package files...
  **  Deleting unnecessary Chocolatey extracted file logs...
  **  Deleting unnecessary Chocolatey log files...
  **  Deleting unnecessary Chocolatey package embedded archive files in toolsDir...
  **  Deleting unnecessary Chocolatey package embedded archives and executables in .nupkg files...
  **  Deleting unnecessary Chocolatey package embedded license files...
  **  Deleting unnecessary Chocolatey package embedded Microsoft installers...
  **  Deleting unnecessary Chocolatey package embedded various read me files...
  **  Deleting unnecessary Nuget cache files...
Choco-Cleaner finished deleting unnecessary Chocolatey files and saved you 85.008 KB!
Found Choco-Cleaner.ps1 useful?
Buy me a beer at https://www.paypal.me/bcurran3donations
Become a patron at https://www.patreon.com/bcurran3

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
<span>%d</span> bloggers like this: