Delete a repository
Delete a repository with every image, tag and scan in it.
Replace repository-id with the repository's id.
Warning
Deleting a repository cannot be undone. Its images are not restorable, and a pull of any of its tags fails from then on, including from a running deployment.
Prerequisites
- Permission for
ecr:DeleteRepositoryon the repository. - In the console, also
ecr:DescribeRepositorieson it; without it the repository's page answers 404.
Delete it
- Open Image repositories, then open the repository.
- Open the Danger zone tab. (Delete repository in the page's ⋯ menu opens it too.)
- Under Delete this repository, choose Delete repository.
- Type the repository's name, then choose Delete repository.
The console returns to the repository list. Without the permission, the tab says "Your policies do not grant ecr:DeleteRepository on this repository; ask an administrator." and the button is off.
dcloud ecr repositories delete repository-idDELETE /ecr/api/repositories/repository-idRemove the dcloud_ecr_repository resource from your configuration and apply.
Result
200 with the deleted repository. Its images, tags and scans are gone. Its layers are no longer
used by it; layer cleanup deletes the ones no other repository holds (see
Storage and cleanup). A 404 Not found answers an unknown id.