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

オープン
#6,673 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C++
スター
26.6k
フォーク
1.8k
平均マージ
3日 10時間
マージ済み PR(30日)
41

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/winget-cli のほかの issue

microsoft/winget-cli の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。