Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I clean cargo stuff?

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?

like image 663
Sergey Potekhin Avatar asked Oct 29 '16 14:10

Sergey Potekhin


People also ask

What is cargo clean?

Unitor CargoClean HD™ is a heavy duty alkaline cleaner with cutting-edge cleaning technology newly formulated for cleaning cargo holds on bulk carriers.

How do you clean holds after discharge of a general cargo?

Tips for proper cargo hold cleaningCargo residues contained in hold wash water should be disposed in line with MARPOL Annex V or any local requirements. There should be sufficient fresh water to enable a final thorough fresh water rinse of all holds to remove all traces of chlorides.

What is cargo add?

By default, cargo add will add a wildcard dependency for the crate; you can add multiple such wildcard dependencies at once by listening them one by one (e.g. cargo add serde libc time will add all three crates).

What is cargo watch?

Cargo-watch helps you shorten your fix, compile, run cycle by automatically building your project in the background whenever you make changes to your code.


1 Answers

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/.

like image 110
Lukas Kalbertodt Avatar answered Sep 22 '22 08:09

Lukas Kalbertodt