What it is
Cargo's build output for a Rust project: compiled dependencies, incremental data and binaries.
Can you delete it?
Yes, it is rebuilt automatically. cargo build recreates it. Note: Maven Java projects also use a folder called target, also build output.
How to clean it safely
- Check the project has no work you need: git status
- In the project, run: cargo clean
Step-by-step guide: Rust target folders →
Related folders
- Next.js .next folder ·
<project>/.next - sccache ·
~/Library/Caches/Mozilla.sccache - Rust toolchains ·
~/.rustup/toolchains - Cargo registry (Rust) ·
~/.cargo/registry - Cargo git checkouts ·
~/.cargo/git - Conan packages ·
~/.conan2/p
Questions
Is it safe to delete <project>/target?
Yes, it is rebuilt automatically. cargo build recreates it. Note: Maven Java projects also use a folder called target, also build output.
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 to download, no account, no ads.
Download for Mac