Installer cache in %TEMP%\WinGet accumulates silently with no visibility or built-in cleanup
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Read the related issue #6623 for context on proposed maintenance commands, then trace the installer cleanup flow around RemoveInstallerFile and how WinGet chooses its temporary cache locations. The issue leaves the command design open; done means users can inspect and safely clean leftover installer files in both listed cache locations.
Written by the indexing model from the issue text.
Description
Description of the problem
Problem: WinGet leaves downloaded installer files behind in its temp cache with no built-in way to discover or clean them, and they can accumulate to multiple gigabytes over time.
Real-world example
On this machine:
%TEMP%\WinGetaccumulated a substantial amount of leftover installer payloads over time (e.g. Chrome/GitKraken/GitHubDesktop/Comet installers plus multiple old versions ofuv, Devin CLI, Copilot,pi, etc.).- The WinGet cache became a noticeable, non-obvious contributor to Temp disk usage.
- There is no
wingetcommand to show the cache size/location or to purge it, so the only recourse was manual deletion:Remove-Item "$env:TEMP\WinGet\*" -Recurse -Force.
Where installers accumulate
%TEMP%\WinGet(default temp location)%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\TempState\WinGet(packaged/App Installer context)
Why they are left behind
Winget removes installers after installation via RemoveInstallerFile, but files can remain when an operation is interrupted, fails hash verification in certain flows, or the process exits unexpectedly. These leftovers are not surfaced to the user and are not cleaned up by any winget maintenance command.
Impact
- Silent disk-space consumption (easy to miss because it lives under Temp).
- No visibility: users cannot tell from winget how much space its cached installers occupy or where they are.
- No safe, supported cleanup path exposed by the tool that produced the files.
Notes
Related: #6623 proposes a bundle of maintenance commands (including clean/cache purge/cache list) as a possible solution. This issue is filed to focus on the underlying problem — leftover installer cache is opaque and unmanageable today — independent of any particular command design.
- Dominant language
- C++
- Stars
- 26.6k
- Forks
- 1.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 41
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/winget-cli
-
Issue-Docs Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microsoft/winget-cli#6692 ·
Maintainers usually reply within 2 days
-
Issue-Docs Possible-Duplicate
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/winget-cli#6493 · 1 comment ·
Maintainers usually reply within 2 days
-
Issue-Feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/winget-cli#6427 ·
Maintainers usually reply within 2 days
-
Issue-Docs msstore
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/winget-cli#6331 · 1 comment ·
Maintainers usually reply within 2 days
-
Command-Source Issue-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/winget-cli#6148 ·
Maintainers usually reply within 2 days
All issues in microsoft/winget-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
feat
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Maintainers usually reply within 1 day