12

I tried to install Parity (an Ethereum client) on my CHIP computer (similar to a Raspberry Pi with 4GB memory). I cloned the repository and ran

cargo build --release

After a while I noticed that about 40% of the memory was used and I stopped the installation process. There was only 20% used before, so now I want to clean all of this Rust stuff. How can I do that?

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Sergey Potekhin
  • 621
  • 1
  • 11
  • 27

1 Answers1

24

Cargo places all temporary build files into the target/ directory. Sometimes, if not already present, Cargo also creates a Cargo.lock file. The directory can be removed by executing:

cargo clean

Cargo also saves the package index and the source code of dependencies globally in ~/.cargo/registry/.

Lukas Kalbertodt
  • 79,749
  • 26
  • 255
  • 305