Mass delete Github Workflow Run Logs with this script

Github workflow doesn’t allow mass deletion of Workflow Action run logs, it takes 2 clicks to delete each run log.

If you wanted to delete hundreds of these, the only way is to script something.

Luckily you can do so using the gh Github Command Line Tool and some json parsing using the jq tool.

gh – brew install gh
jq – brew install jq

This is how a successful run is supposed to look like, it will delete 30 logs at the time: