Add package maintenance commands: autoremove, clean, cache purge and cache management and doctor.

未关闭
#6,623 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
cpp
领域
cli

调研方向

This is a large feature request bundling several commands (autoremove, clean, cache management, doctor) with no implementation detail about where cache or dependency tracking lives in the codebase. Start by reading how existing commands are registered under src/AppInstallerCLICmds and how the installer cache directory is managed, then discuss scope with maintainers — this likely needs design work and maintainer buy-in before any code. Done would mean accepted command specs and then incremental implementation.

由索引模型根据 Issue 内容生成。

描述

Issue-Feature Needs-Triage
Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Please add the following maintenance commands to WinGet:

  1. winget autoremove : Remove unused dependencies.
  2. winget clean: Clean temporary files and old installer data.
  3. winget cache: Show cache size and location.
  4. winget cache list: List cached installers.
  5. winget cache remove: Remove cache for a specific package.
  6. winget cache purge: Remove all cached installers.
  7. winget cache reset --force: Reset and rebuild the cache.
  8. winget doctor: Checks corrupted cache, broken package registrations, source issues, and installation problems.

Benefits:

  • Saves disk space.
  • Simplifies package maintenance.
  • Better for power users and developers.
Proposed technical implementation details
  • Track downloaded installer cache.
  • Track package dependencies installed through WinGet.
  • Add safe cleanup and dependency removal.
  • Support --whatif for previewing changes.
  • Display reclaimed disk space after cleanup.
  • Support JSON output for automation.

Example:

winget autoremove --whatif winget clean --whatif winget cache purge --whatif

Add:

winget doctor

Checks:

  • Corrupted cache
  • Broken package registrations
  • Source issues
  • Installation problems
主要语言
C++
星标
26.6k
派生
1.8k
平均合并
3 天 10 小时
30 天内合并 PR
41

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/winget-cli 的其他 Issue

查看 microsoft/winget-cli 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。