cargo clean

Remove artifacts that cargo has generated in the past

Options

NameDescription
-p, --package <package...>
  • Repeatable ♾
--manifest-path <manifest-path>Path to Cargo.toml
--target <target>
  • Repeatable ♾
--target-dir <target-dir>Directory for all generated artifacts
--profile <profile>Clean artifacts of the specified profile
--color <color>Coloring: auto, always, never
--config <config>
  • Repeatable ♾
-Z <unstable-features>
  • Repeatable ♾
-q, --quietDo not print cargo log messages
-r, --releaseWhether or not to clean release artifacts
--docWhether or not to clean just the documentation directory
-h, --helpPrint help information
-v, --verbose
  • Repeatable ♾
--frozenRequire Cargo.lock and cache are up to date
--lockedRequire Cargo.lock is up to date
--offlineRun without accessing the network