Yank Cargo Crates

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Artifactory supports yanking crates in local repositories. Yank a crate to remove the version of the crate from the registry's index and make it unavailable for new dependencies, without removing the code or breaking existing projects that use the crate.

Note

To synchronize yanking in Smart remote repositories and replications, the properties must be synced.

To yank a Cargo crate:

Run the following command:

cargo yank <CRATE> --vers <VERSION> --token "<AUTH>"

Where:

  • <CRATE>: The name of the crate

  • <VERSION>: The version of the crate you want to yank

  • <AUTH>: Your Artifactory identity token

For example:

cargo yank hello_world --vers 0.1.4 --token "7gK9pS4wR2tYqLzV8xN1bM5hC3jF6dEaGuIvPzXoAsDfHjKlQwErTyU0i"

Tip

You can add the --undo flag at the end of the command to un-yank the crate. For example:

cargo yank hello_world --vers 0.1.4 --token "7gK9pS4wR2tYqLzV8xN1bM5hC3jF6dEaGuIvPzXoAsDfHjKlQwErTyU0i" --undo