Chocolatey needs better shim management/cleanup
Checklist
- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
Looking over my long-standing Chocolatey install, I'm seeing an accumulation of shims that probably should not exist. At least some of these appear to be due to bad (or formerly bad) packages that created shims for things that they shouldn't have:
Even if some of the packages get fixed (or already have been), this won't clean up the mess that has already been made in my Chocolatey environment - which I have no idea how to safely deal with myself at this point.
Describe The Solution. Why is it needed?
It would be ideal for Chocolatey to implement some kind of shim cleanup functionality, so that it's not up to the end user to live with or figure out how to safely clean up the mess.
I would NOT consider it a success criteria to simply prevent this issue from occurring going forward, especially on a package-by-package basis, short of Chocolatey providing a good way for a regular end user to easily and safely flatten and reload to a clean Chocolatey install without losing apps/data.
Edit: A command to probe individual shims is also not sufficient here. Besides requiring esoteric Chocolatey knowledge, it imposes a burden on the end user to manually audit all shims periodically AND know how to manually perform a safe cleanup in order to achieve the desired result of no orphaned shims.
Additional Context
No response
Related Issues
No response
Appears to potentially be a dup of #1757
Also see this comment: https://github.com/chocolatey/choco/issues/3204#issuecomment-1598175167
Appears to potentially be a dup of #1757
#1757 itself seems very vague and not targeted specifically at what I'm asking for. However, https://github.com/chocolatey/choco/issues/1757#issuecomment-1597406457 does appear to propose something relevant to my issue - provided that Chocolatey removes the orphaned shims for the end user, or at least provides clear, detailed instructions on what the end user can do to safely clean up the mess themselves.
Also see this comment: #3204 (comment)
The currently-existing functionality described is not a good solution for a number of reasons.