Comment by mbrubeck

3 days ago

Automatic garbage collection of old build artifacts* is coming in Rust 1.88 (currently on the beta channel, will become the new stable release in two weeks):

https://github.com/rust-lang/cargo/issues/12633

*EDIT: For now this only deletes old cached downloads, not build artifacts. Thanks epage for the correction below.

That’s as an additional flag and not the default?

  • In versions earlier than 1.88, garbage collection required the unstable -Zgc flag (and a nightly toolchain). But in 1.88 and later, automatic garbage collection is enabled by default.