Delete a repository

Delete a repository with every image, tag and scan in it.

Last updated 18 November 2026View as Markdown

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:DeleteRepository on the repository.
  • In the console, also ecr:DescribeRepositories on it; without it the repository's page answers 404.

Delete it

  1. Open Image repositories, then open the repository.
  2. Open the Danger zone tab. (Delete repository in the page's ⋯ menu opens it too.)
  3. Under Delete this repository, choose Delete repository.
  4. 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.

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.

Did this page help you?