Mac storage basics · Developer tools
How do I clear Rust, Go and other language build caches?
Short answer: Use cargo clean for Rust target folders, go clean -cache and -modcache for Go, conda clean --all for Conda, and delete old .venv folders. All are regenerated later.
Most toolchains have a cleanup command:
- Rust:
cargo cleanin a project removes itstargetfolder, often the biggest item. - Go:
go clean -cacheclears build cache;go clean -modcacheclears downloaded modules. - Conda:
conda clean --allremoves package caches and unused packages. - Python virtual environments: delete
.venvfolders in inactive projects and recreate them later.
Everything here is regenerated by the next build or install.