Hi, what’s the best way to delete an old image from the registry (registry.replicated.com)?
It’s not possible to delete images from the registry, but you can push a new empty image with the same tag.
1 Like
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
We discourage removing tags from the registry as it could break older releases of your application.