How do I clean up and remove old builds from cloudbuild?

4,107 views
Skip to first unread message

Adam Devoe

unread,
Jun 28, 2022, 12:20:09 PM6/28/22
to Google Cloud Developers

We don't really care about the old builds, and don't need to keep them around for posterity.

Is there some command to use so we can write a script to delete them?   I am not seeing any way to delete the old builds on the history page, or in the command line documentation. (gcloud builds describe ... but no delete)

Thanks

Osvaldo Lopez Acuña

unread,
Jun 29, 2022, 12:09:00 PM6/29/22
to Google Cloud Developers

There’s no gcloud command to delete a build. Where are your old builds stored? This can help us to give you a more precise guide to achieve it. If they are stored in Google Cloud Storage, this guide could be helpful [1], but if they are in Google Artifact Registry this other one could solve it [2].

[1]:https://cloud.google.com/storage/docs/deleting-objects 

[2]:https://cloud.google.com/artifact-registry/docs/repositories/delete-repos 

Reply all
Reply to author
Forward
0 new messages