Clean up GitHub workflow runs in terminal
Delete all GitHub workflow runs in terminal using gh cli command
Velu S Gautam1 min readTechnology
Delete all GitHub workflow runs for an action in the terminal using gh cli command.
Replace ${action.yml} with the filename of the workflow you need to run
BASH
for id in $(gh run list --workflow ${action.yml} --json databaseId --jq '.[].databaseId'); do gh run delete "$id"; doneThis help to cleanup when you want to rename a GitHub action and cleanup the previous action from the All workflows section