6
votes

On my Windows 10 machine it's 3.5GG. What is it storing? How can I trim it down?

1
My intermediate directory of our C++ build has about 150GB ... so 3.5 doesn't seem to bad for whatever build system :-) - Martin Ba
@MartinBa That includes object files and debugging information for them. .cargo does not include build artifacts for a given project. - Acorn

1 Answers

4
votes

It is storing all the downloaded crates you have used, their binaries, the index of registries, etc. It is going to take a lot of space and will keep increasing.

You can safely remove .cargo/registry/ (if you remove the entire folder, you will lose installed binaries and your Cargo configuration if you had one). Afterwards, everything you use again will be downloaded and it will start growing back. It is a common way of getting rid of very old dependencies you are not using anymore.