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

Aberta
#6,673 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
cpp
Domínio
cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C++
Estrelas
26.6k
Forks
1.8k
Merge médio
3d 10h
PRs com merge (30d)
41

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/winget-cli

Todas as issues de microsoft/winget-cli

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.