Installer cache in %TEMP%\WinGet accumulates silently with no visibility or built-in cleanup

Offen
#6,673 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
cli

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Issue-Feature
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%\WinGet accumulated a substantial amount of leftover installer payloads over time (e.g. Chrome/GitKraken/GitHubDesktop/Comet installers plus multiple old versions of uv, Devin CLI, Copilot, pi, etc.).
  • The WinGet cache became a noticeable, non-obvious contributor to Temp disk usage.
  • There is no winget command 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.

Vorherrschende Sprache
C++
Sterne
26.6k
Forks
1.8k
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
41

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/winget-cli

Alle Issues in microsoft/winget-cli

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.