Skip to content

Is it safe to delete Cargo registry cache?

Crates that Cargo, Rust's package manager, has downloaded from crates.io, with their unpacked source code.

Safe

Its owner recreates it by itself when it needs it, and nothing you made is lost.

~/.cargo/registry

What it is

Cargo keeps the registry index, the downloaded .crate archives and their unpacked sources here, shared by every Rust project you build. If anything is missing, Cargo unpacks or downloads it again the next time a project needs it, so nothing you made is lost. Since Rust 1.88, Cargo removes downloads it hasn't used in three months, but the folder can still be large if you build many projects.

If it's removed

The next build of each Rust project downloads its crates again, which takes time and a network connection. Offline builds fail until then.

How it's removed

Moved to the Trash, where you can restore it.

PRO

The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It starts checked in the Cleanup checklist, except inside Documents or Desktop.

Sources

Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.