Is it safe to delete Cargo registry (Rust)?

~/.cargo/registry · Safe to delete

What it is

Downloaded Rust crates and their sources.

Can you delete it?

Yes, it is rebuilt automatically. Cargo downloads them again. Each project's own target/ folder is usually bigger and also rebuildable.

How to clean it safely

  1. Delete ~/.cargo/registry/cache and ~/.cargo/registry/src
  2. Run cargo clean inside old projects to remove target/

Questions

Is it safe to delete ~/.cargo/registry?

Yes, it is rebuilt automatically. Cargo downloads them again. Each project's own target/ folder is usually bigger and also rebuildable.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free beta for Mac.

Download for Mac