Contents

How to Delete Github Action Runs

Contents

Github Actions keeps actions history for a while and if you’re working on a updating action you might need to clean old runs.

We are going to delete all (up to 20 at a time) runs for all workflows in the current branch (assuming you are in your git repo)

shell

gh run list -b $(git rev-parse --abbrev-ref HEAD) --json databaseId -q '.[].databaseId' | xargs -I % gh api \
    "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/%" \
    -X DELETE
Second Head Post
This is a post from Second Head. So please, don’t expect too much.

Related Content