Delete Environments flagged as Failure

I am setting up some Actions workflows on my repo where a workflow creates a Deployment which in turn triggers another workflow to deploy resources with Terraform.

The usual debugging process has left me with a number of deployments marked as failure, a couple of which are on the repo page under Environments.

Is there a way to clean this up ? At this stage it would be fine if I needed to blow it up and start again.

I have tried some 3rd party scripts which are supposed to delete all deployments in a repo but the response is that none are found. Same when I make a curl request to list deployments as per the docs.

I can’t be the first person with this issue?

You can delete environment Environments - GitHub Docs , when you do, pending jobs will be handled as failures.

We mark environment as inactive when that’s deleted and leave deployment, for historic representation.