Installation-file-cleaning is currently only available in the licensed edition of Chocolatey ($96 a year) and the developers seemingly have no plans to offer cache-cleaning support for the free version.
The package installation files can easily take gigabytes of storage space and to my knowledge they only increase in size as the user updates packages and installs new software, with only your hard drive capacity as the upper limit.
I don't know if Chocolatey stores cache in one central location — something is saved to ~\AppData\Local\Temp but the majority is located in the lib* folders in ~\ProgramData\chocolatey. Also the log files in the logs folder total to over 100 MB on my system. Is there any way to fully clear Chocolatey cache without manually deleting directories?
1 Answer
You may use for cleaning the cache the unofficial but approved package ofchoco-cleaner.
The installed package creates a Windows Scheduled Task to run Choco-Cleaner.ps1every Sunday at 11:00 PM.
To install, run the following:
choco install choco-cleanerTo upgrade (unofficial) Choco Cleaner (Script + Task), run the following:
choco upgrade choco-cleanerYou may also manually run this task immediately in one of the following ways from the documentation:
Command Prompt:
\ProgramData\chocolatey\lib\choco-cleaner\tools\Choco-Cleaner-manual.batPowerShell:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted C:\tools\BCURRAN3\choco-cleaner.ps1Windows Start Menu: If you have
choco-shortcuts-winconfiginstalled, you'll find it with the rest of the Chocolatey Shortcuts.