def remove_tag()

in tools/build-image.py [0:0]


def remove_tag(image_name):
    splits = image_name.split(":")
    if len(splits) != 2:
        fail("Image name is not in the required format")
    cmd = get_cmd("curl")
    curl = [cmd, "-X", "DELETE", "-H", "Authorization: JWT " + docker_token]
    curl.extend(["https://hub.docker.com/v2/repositories/" + splits[0] + "/tags/" + splits[1] + "/"])
    retcode = subprocess.call(curl)
    if retcode:
        fail("docker tag cleanup failed")