Skip to content

Instantly share code, notes, and snippets.

@npanuhin
Created December 16, 2023 22:46
Show Gist options
  • Save npanuhin/ce2a5c50a28d07541de4bbbb398ada4f to your computer and use it in GitHub Desktop.
Save npanuhin/ce2a5c50a28d07541de4bbbb398ada4f to your computer and use it in GitHub Desktop.
GitHub: remove workflow history from repository

Run in bash (linux) or Git Bash (Windows)

Remove all workflows:

gh run list --json databaseId --jq ".[].databaseId" --limit 1000 | xargs -n1 gh run delete

Remove specific workflow:

gh run list --workflow "{Workflow name}" --json databaseId --jq ".[].databaseId" --limit 1000 | xargs -n1 gh run delete

You might need to run several times or adjust the limit (default is quite small)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment