tldr/pages/common/cargo-remove.md

17 lines
441 B
Markdown
Raw Normal View History

# cargo remove
2023-10-29 08:54:53 +00:00
> Remove dependencies from a Rust project's `Cargo.toml` manifest.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-remove.html>.
2023-10-29 08:54:53 +00:00
- Remove a dependency from the current project:
2023-10-29 08:54:53 +00:00
`cargo remove {{dependency}}`
2023-10-29 08:54:53 +00:00
- Remove a development or build dependency:
2023-10-29 08:54:53 +00:00
`cargo remove --{{dev|build}} {{dependency}}`
2023-10-29 08:54:53 +00:00
- Remove a dependency of the given target platform:
2023-10-29 08:54:53 +00:00
`cargo remove --target {{target}} {{dependency}}`