Automatically delete old builds from Unity Cloud Build

Hi

Is there a way to automatically delete old builds via a setting in a build config or external script?

We want to clear out old builds within a config after a certain period of time. This helps keep the data returned by the cloud build api cleaner and also saves spaces on your servers.

Thanks

Hey Chris,

Thanks for providing this great feedback. I agree this would be a very healthy feature for the service (and I appreciate your concern about our server space too!)

I will pass this on to the development team.

Is this not built into the system as a core feature? I am cursorily looking into Cloud Builds and was assuming this would be part of the basic feature set.

@ollieblanks Can you confirm that this basic feature is not there yet, and if not when will it be added? Thank you.

Any news on this? Especially as storage costs are going up with this new pricing. Thanks

Or at least a way to filter by date. So we can select all build before a specific date and delete them.
You cannot add a “you pay for the storage” and not give us a simple way to clean that storage

This is currently possible through the API. See the Delete artifacts for a batch of builds section of our API docs.

For an example, do a POST request to “https://build-api.cloud.unity3d.com/api/v1/orgs/{ORG_ID}/projects/{PROJECT_ID}/artifacts/delete/?allWithExclusions=true”

and in the body, add:

{
    "excludedBuilds": [],
    "filters": {},
    "deleteOnOrBeforeDate": "2023-01-01T18:51:33.412Z"
}

This will delete every non-favorited build before January 1st 2023

with the API ?
You mean something that the average Unity Game Developer doesn’t know how to use ?

Thank you for the info

I agree this automatic deletion feature would be very helpful.
Many times we do control builds we really don’t want to keep.
It would be useful if we could tag the ones we want to keep and the other ones be automatically deleted over time.

For anyone that needs step-by-step instructions for purging old builds using the API, see:

bump, would be really nice to have an easier way to clean up old build storage, especially now that we are getting actively charged for it!

How can this not be an option you access from the GUI?

I agree this feature would be super helpful, and I’m surprised it’s not there already!