Delete GitHub Actions runs attributed to ghost user

I was cleaning one of my GitHub repositories a bit, removing runs from old actions or from deleted branches that weren’t relevant anymore when I stumbled upon an issue: I can’t delete some of my oldest experimental runs for a workflow I haven’t used since and deleted a long time ago. For some reason they are attributed to a “ghost” user so I don’t have the rights to delete them. It’s not a critical issue, but it kind of gets in the way of my cleanup.

Is there a way to remove such runs? Once a user doesn’t exist anymore, it would make sense for repository maintainers to get the ability yo do so.

Thanks in advance.

I ran with the same problem, but fortunately, I also found a solution.
You can use the new CLI command to delete a workflow run:

gh api -X DELETE /repos/<owner>/<repo>/actions/runs/<run-id>

You can get the list of the run with the command gh run list.