sincecutoff.com
← all changes

gh cache delete can delete all caches for a ref

Introduced 2026-01-21 · score 0.98

HOW TO USE IT

When deleting all GitHub Actions caches for a ref, run `gh cache delete --all --ref <ref>`; use a fully qualified branch or pull request ref.

gh cache delete --all --ref refs/heads/<branch-name>
gh cache delete --all --ref refs/pull/<PR-number>/merge

WHY THIS HELPS

Delete all GitHub Actions caches associated with a ref.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.86.0
  • --all (required): Delete all caches; combine with `--ref` to target one ref.
  • --ref <string> (required): Target a ref formatted as `refs/heads/<branch name>` or `refs/pull/<number>/merge`.
  • Prerequisite: Deletion requires authorization with the `repo` scope.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card