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