Deleting a Crate Version
Deleting a crate version permanently removes it from the registry.
Deleting crate versions is not part of the official registry API specified by Cargo. Instead, it is an additional tool provided by Shipyard.rs to give our users complete control over a registry which exists for their purposes (a different context from a public registry like crates.io for which the API was designed).
Words of Caution
In general, yanking should be preferred, for several reasons:
-
Stability: Yanking won't break existing code. A yanked version can still be downloaded, a deleted version cannot be.
-
Reversibility: A yanked version can be unyanked, a deleted version cannot be undeleted.
-
Visibility/Transparency: A yanked version remains listed among other versions, providing discoverability to other developers that a problem was discovered in that version's code. It's documentation is still available.
How to Delete a Crate Version
To delete a crate version, navigate to the crate version detail page, located at the (pseudo-) url:
https://shipyard.rs/<org-slug>/crates/<crate-name>/<version>
For example, the crate version detail page for the crate rust-deserts
version 1.1.0
for the my-private-registry
registry would be:
https://shipyard.rs/my-private-registry/crates/rust-deserts/1.1.0
Navigating to the page should be fairly intuitive starting from the Crates page by clicking to the crate detail page, and then selecting a version and clicking through to the crate version detail page.
The Delete Crate Version section contains a button to initiate the delete:
Clicking the "Delete" button will bring up a confirmation page:
Clicking the "DELETE" button (with a skull and crossbones icon) will delete the crate version.
All copies of the version's:
.crate
file (what Cargo downloads to build the dependency)- Rustdoc (documentation)
.html
files - Metadata entry in the registry's crate-index repository
- Crate metadata entries stored in databases
...will be permanently deleted.
Copies of that data may exist in backups for up to 60 days. It is not possible for a user to retrieve those copies for the purpose of reinstating a deleted crate version.
Deleting an Entire Crate
Deleting can only be applied to a single crate version. To delete an entire crate, delete all versions of the crate. When no versions of the crate remain, the crate itself will be automatically deleted.
After a crate itself has been deleted it no longer counts towards resource limits regarding number of crates that apply to some account plans.