Friedrich Ewald My Personal Website

How to Delete Unused Google AppEngine Instances

Google AppEngine only allows to have 15 instances maximum per project. I have set up a build pipeline which automatically deploys a new version every time I update this blog. To delete the older, no longer needed versions I am using this one liner:

yes | gcloud app versions delete `gcloud app versions list --filter=TRAFFIC_SPLIT=0 | cut -c 10-24 | grep '[0-9]'`
This deletes all versions which are not serving traffic. The only catch is that those versions need to have a number in it to be recognized via regex. In my case the versions automatically have the current date as name so that this isn’t a problem.

About the author

is an experienced Software Engineer with a Master's degree in Computer Science. He started this website in late 2015, mostly as a digital business card. He is interested in Go, Python, Ruby, SQL- and NoSQL-databases, machine learning and AI and is experienced in building scalable, distributed systems and micro-services at multiple larger and smaller companies.