Delete broken environments

Hi,

i was creating some review apps with a .gitlab-ci.yml and those review apps were created as environments.

That worked well, but the on_stop-job was broken that time.

I didn’t recognise it was broken and merged the changes into main.

Now i have the problem that i cannot delete the already created review-app environment as the on_stop job will always and forever fail (now because the branch doesn’t exist anymore).

I just don’t want to see it in gitlab anymore…

Hi @philippstappert

you can use GitLab API to delete environment

Hello!

I have some environments that are stuck in a null state that have been stuck for months neither stopped or active; like a pointer that is pointing to nothing.

Following your instructions to use the API I get a good query of these Environments with state: stopping but when I attempt delete them with the API I get a 404 Not Found.

How can I go about deleting these environments?

Thanks!

I was noticing the same for a couple of my own environments. No luck deleting them via the API either.