aws ec2 deregister-image
Deregisters the specified AMI. AWS CLI reference
3 options Its page in the AWS CLI reference
Options
--delete-associated-snapshotsSpecifies whether to delete the snapshots associated with the AMI during deregistration.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--image-idThe ID of the AMI.