Forrest logo
back to the aws tool

aws-ecr:tldr:5b6b0

aws-ecr: Delete an image from a repository.
$ aws ecr batch-delete-image --repository-name ${repository} --image-ids imageTag=${latest}
try on your machine

This command is using the AWS CLI (Command Line Interface) to batch delete a specific image from an Amazon Elastic Container Registry (ECR) repository.

Here is the breakdown of the command:

  • aws: The command to invoke the AWS CLI.
  • ecr: Specifies the AWS ECR service.
  • batch-delete-image: The action to perform on the ECR repository, which is to delete images in batches.
  • --repository-name ${repository}: Specifies the name of the ECR repository where the image is stored. ${repository} is a placeholder variable that should be replaced with the actual repository name.
  • --image-ids imageTag=${latest}: Specifies which image to delete. imageTag=${latest} indicates that the image to delete is identified by its tag value. ${latest} is another placeholder variable representing the specific tag value (e.g., "v1.0"). You need to replace ${latest} with the desired tag value.

Overall, this command is used to delete a specific image from an ECR repository by providing the repository name and image tag.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aws tool