cargo
Rust cargo remove
Remove a declared dependency from the manifest. Remove or adapt code that uses it as well. In a disposable edit-app copy, add price before removing it. Example format: shell; run from a disposable copy of v15/fixtures/projects/edit-app. Expected result (not executed): The price dependency is absent from Cargo.toml after removal. Why: Cargo edits dependency declarations, not the program source. Common mistake: Removing a dependency while leaving references to its API.
Formal Syntax & Structure
rust syntaxrust
cargo remove [OPTIONS]Working Example
Example Snippetrust
cargo add --offline --path pricecargo remove --offline price