CmdID / aws / aws codeartifact
aws codeartifact delete-package-versions
Deletes one or more versions of a package. AWS CLI reference
1 example 8 options Its page in the AWS CLI reference
Examples
To delete package versions
The following delete-package-versions example deletes version 4.0.0 of a package named test-package.
aws codeartifact delete-package-versions --domain test-domain --repository test-repo --format npm --package test-package --versions 4.0.0Identify--domainThe name of the domain that contains the package to delete.--repositoryThe name of the repository that contains the package versions to delete.--formatThe format of the package versions to delete.--packageThe name of the package with the versions to delete.--versionsAn array of strings that specify the versions of the package to delete.Its output
{
"successfulVersions": {
"4.0.0": {
"revision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
"status": "Deleted"
}
},
"failedVersions": {}
}For more information, see Delete a package version in the AWS CodeArtifact User Guide.
Options
--domain-ownerThe 12-digit account number of the Amazon Web Services account that owns the domain.--domainThe name of the domain that contains the package to delete.--expected-statusThe expected status of the package version to delete.--formatThe format of the package versions to delete.--namespaceThe namespace of the package versions to be deleted.--packageThe name of the package with the versions to delete.--repositoryThe name of the repository that contains the package versions to delete.--versionsAn array of strings that specify the versions of the package to delete.