Deletes a repository. If the repository contains images, you must either delete all
images in the repository or use the force option to delete the
repository.
Example
Use a bare-bones client and the command you need to make an API call.
The specified repository could not be found. Check the spelling of the specified
repository and ensure that you are performing operations on the correct registry.
These errors are usually caused by a server-side issue.
Example
To force delete a repository
// This example force deletes a repository named ubuntu in the default registry for an account. The force parameter is required if the repository contains images. constinput = { "force":true, "repositoryName":"ubuntu" }; constcommand = newDeleteRepositoryCommand(input); constresponse = awaitclient.send(command); /* response == { "repository": { "registryId": "012345678901", "repositoryArn": "arn:aws:ecr:us-west-2:012345678901:repository/ubuntu", "repositoryName": "ubuntu" } } */ // example id: deleterepository-example-1470863805703
Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the
force
option to delete the repository.Example
Use a bare-bones client and the command you need to make an API call.
Param
DeleteRepositoryCommandInput
Returns
DeleteRepositoryCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
Throws
KmsException (client fault)
The operation failed due to a KMS exception.
Throws
RepositoryNotEmptyException (client fault)
The specified repository contains images. To delete a repository that contains images, you must force the deletion with the
force
parameter.Throws
RepositoryNotFoundException (client fault)
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Throws
ServerException (server fault)
These errors are usually caused by a server-side issue.
Example
To force delete a repository