Remove image from Replicated registry


#1

Hi, what’s the best way to delete an old image from the registry (registry.replicated.com)?


#2

It’s not possible to delete images from the registry, but you can push a new empty image with the same tag.


#3

Thanks. That’s not ideal, since the tags will still show up in the KOTS vendor portal under Images forever. But here’s how I did it in case it helps someone later:

# Make empty image
cat <<EOF > Dockerfile
FROM scratch
CMD /nope
EOF

docker build -t myscratch:latest .

for i in image1:{v1,v2,v3} image2:{v4,v5,v6}
do
    docker tag myscratch:latest registry.replicated.com/myslug/$i
    docker push registry.replicated.com/myslug/$i
done

#4

We discourage removing tags from the registry as it could break older releases of your application.