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

Aperta
#6,623 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
C++
Stelle
26.6k
Fork
1.8k
Merge medio
3g 10h
PR unite (30g)
41

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/winget-cli

Tutte le issue di microsoft/winget-cli

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.