It seems like the crate cache grows without bound. It would be nice to have a command to clear it.
FWIW blowing away ~/.cargo/registry and ~/.cargo/git should always be ok, but I do agree it'd be nice to have a command to automatically do so!
Having thought about this in the context of the Approx Debian package cache, there seems no algorithms for cleaning packages that are not best implemented by manual use of rm and find. A cache cannot predict which packages will be used, so there is no determinism as to which packages are actually needed – dependencies cannot be calculated. Thus algorithms such as "older than X" or "everything" are all that you can do. "Keep all but the latest" is perhaps the only algorithm not easily implemented with find and rm, but is that a useful criterion?
I'm going to close this as a duplicate of #3289. Thanks!!
@jrmuizel I'm still working on it, but feel free to have a look already :D https://github.com/matthiaskrgr/cargo-cache/
Most helpful comment
@jrmuizel I'm still working on it, but feel free to have a look already :D https://github.com/matthiaskrgr/cargo-cache/