How to delete dangling images in ECR

Docker client running in laptop talks to AWS ECR.

After pushing docker image(with test tag) to ECR, more than one time, older docker images goes dangling in ECR

What is the docker command to delete dangling image in ECR

Source: StackOverflow