Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Provide assistance in uninstalling unused toolchains, i.e. toolchain garbage collection

Aperta
#4,548 7 commenti 9 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

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
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

Non sono indicati file o test. Inizia esaminando gli entry point esistenti dei comandi rustup toolchain list, di installazione e disinstallazione, quindi determina come l'esecuzione di una toolchain possa registrare l'utilizzo. Il lavoro sarà considerato completato quando sarà definito un ambito concordato con i maintainer che copra i timestamp, l'elenco, il comportamento di pulizia e gli eventuali avvisi o la configurazione dell'installazione.

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

Descrizione

enhancement
Problem you are trying to solve

People who work on projects using pinned nightly (nightly-DDDD-MM-YY) or stable (1.XX.0) channels, or who perform bisection on toolchain bugs, may end up with many toolchains installed. It would be useful to help those users know when they can remove no-longer-used toolchains and reclaim disk space.

Solution you'd like

Whenever rustup runs a toolchain binary, update a “last used” timestamp for that toolchain (this could be as simple as touching a file kept with the toolchain, and could be kept at a coarse granularity of 1 day to reduce the cost of writes). Add the following UI features using this data:

  • In rustup toolchain list, include last used dates.
  • Add a command which may be run to uninstall all toolchains that have not been used recently.
  • Whenever a new toolchain is manually or automatically installed, check how many old toolchains are installed and tell the user if there are a lot (perhaps with configurable thresholds).
  • Optionally, automatically uninstall old toolchains to keep the count or age under configured limits.

(Another thing that would help is searching all rust-toolchain.toml files currently present for what channels they request, but that would either be costly or require integration with platform-specific filesystem search systems, so I do not recommend spending effort on this feature unless someone thinks it would be easy.)

Notes

I feel like this is obvious enough that it surely must have been suggested already, but I can't find any issue about it, using keywords like "automatically uninstall" and "toolchain garbage collection”. I apologize if this turns out to be a duplicate.

Lingua principale
Rust
Stelle
7.1k
Fork
1.1k
Merge medio
1g 11h
PR unite (30g)
39

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 rust-lang/rustup

Tutte le issue di rust-lang/rustup

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.