Synopsis
Deletes an artifact and all its versions, or deletes a specific version if the--version flag is provided.
Arguments
Name of the artifact to delete
Options
Registry identifier containing the artifact
Specific version to delete. If not provided, deletes all versions.
Behavior
Delete All Versions
When--version is not specified:
- Deletes the entire artifact entry
- Removes all versions of the artifact
- Cannot be undone
Delete Specific Version
When--version is specified:
- Deletes only the specified version
- Other versions remain intact
- Artifact entry persists if other versions exist
Examples
Output Messages
Successful Version Deletion
Successful Complete Deletion
Error Example
Safety Considerations
If you delete all versions individually, the artifact metadata entry may still exist but will contain no versions.
Use Cases
Remove deprecated version
Remove deprecated version
Clean up test artifacts
Clean up test artifacts
Remove specific snapshot
Remove specific snapshot
Verification
After deletion, verify the artifact is removed:See Also
- hc artifact list - List artifacts
- hc artifact get - Get artifact details