chocolatey-licensed-issues
chocolatey-licensed-issues copied to clipboard
Package Reducer / choco optimize - not working in some cases
What You Are Seeing?
After downloading and recompiling sql-server-2017-cumulative-update, the binaries are still present even when it should be optimized. sql-server-management-studio appears to exhibit similar behavior.
What is Expected?
After sql-server-2017-cumulative-update is installed from a localized package, the .exe is still present
How Did You Get This To Happen? (Steps to Reproduce)
- set choco features with
-
name: Ensure Chocolatey Features
win_chocolatey_feature: name: "{{ item.name }}" state: "{{ item.state }}" loop:
-
name: downloadCache
state: disabled
- name: reduceInstalledPackageSpaceUsage
state: enabled
- name: useFIPSCompliantChecksums
state: enabled
- download and recompile package from https://chocolatey.org/packages/sql-server-2017-cumulative-update
- upload to local chocolatey server
- install via win_chocolatey
- see files still present in directory Directory: C:\ProgramData\chocolatey\lib\sql-server-2017-cumulative-update\tools Mode LastWriteTime Length Name
d----- 2/10/2021 6:31 PM files -a---- 2/10/2021 6:31 PM 1844 chocolateyinstall.ps1 -a---- 2/10/2021 6:31 PM 559201160 SQLServer2017-KB4577467-x64.exe -a---- 2/10/2021 6:35 PM 0 SQLServer2017-KB4577467-x64.exe.ignore
Note: running 'choco optimize' manually does not correct the issue either.
References
┆Issue is synchronized with this Gitlab issue by Unito
The installer is also present (and not reduced) in the files directory
Directory: C:\ProgramData\chocolatey\lib\sql-server-2017-cumulative-update\tools\files
Mode LastWriteTime Length Name
-a---- 2/10/2021 6:31 PM 559201160 SQLServer2017-KB4577467-x64.exe -a---- 2/10/2021 6:35 PM 0 SQLServer2017-KB4577467-x64.exe.ignore
Hi @mmundy1 - I transferred the issue over here to Chocolatey-Licensed-Issues. If you can, please run choco support
and follow the instructions to create a support ticket. We may need some more information from you (logs)
We've had another instance of this:
References
Reproduction Steps
On a system with several packages installed, I've confirmed content is available in the cacheLocation, both on a default system where cacheLocation is $env:TEMP
, and on a system where I've configured the location explicitly with choco config set cacheLocation C:\programdata\chocolatey\choco-cache
.
When I run the choco optimize
command, according to the documentation I am expecting to see the cacheLocation cleared of downloaded binaries, however, this is not the case:
On a system with several packages installed, I've confirmed content is available in the cacheLocation, both on a default system where cacheLocation is $env:TEMP, and on a system where I've configured the location explicitly with choco config set cacheLocation C:\programdata\chocolatey\choco-cache. When I run the choco optimize command, according to the documentation I am expecting to see the cacheLocation cleared of downloaded binaries, however, this is not the case:
PowerShell Output (note the GoogleChrome package here):
Cache location after running the command
EDIT:
I've since rebooted this test machine, and upon checking again, this is the directory:
Clearly something was cleaned up here. Perhaps Optimizer marks files for deletion after next reboot?
Please can a fix for this be investigated. This is causing our servers to run out of space when installing packages with large binaries. Thanks