2023-10-05 07:42:06 +01:00
|
|
|
# cargo remove
|
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
> Remove dependencies from a Rust project's `Cargo.toml` manifest.
|
2023-10-05 07:42:06 +01:00
|
|
|
> 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-05 07:42:06 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
`cargo remove {{dependency}}`
|
2023-10-05 07:42:06 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
- Remove a development or build dependency:
|
2023-10-05 07:42:06 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
`cargo remove --{{dev|build}} {{dependency}}`
|
2023-10-05 07:42:06 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
- Remove a dependency of the given target platform:
|
2023-10-05 07:42:06 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
`cargo remove --target {{target}} {{dependency}}`
|