Describe the bug
When using gh cache delete with a cache-key that has multiple matches like so:
When i run the gh cache delete test-cache-this-is-always-the-same it outputs that one cache was successfully deleted. Even though that all three of these was deleted.
Affected version
gh version 2.78.0 (2025-08-21)
https://github.com/cli/cli/releases/tag/v2.78.0
Steps to reproduce the behavior
- Create a new repository that includes an action that uses
@actions/cache with the same key across multiple branches. (I have created a testing repository, which can be used as a starting point https://github.com/luxass/gh-cache-test)
- Verify with
gh cache list
- Run
gh cache delete which prints that one cache was successfully deleted.
Expected vs actual behavior
I would expect that it prints the correct number of caches that was deleted.
Additional Context
The REST Api supports returning the list of deleted caches when using a cache-key.
https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key
So there should probably be some conditional output, since the delete by cache-id returns a 204 status code.
Logs
Paste the activity from your command line. Redact if needed.
Describe the bug
When using
gh cache deletewith a cache-key that has multiple matches like so:When i run the
gh cache delete test-cache-this-is-always-the-sameit outputs that one cache was successfully deleted. Even though that all three of these was deleted.Affected version
gh version 2.78.0 (2025-08-21)
https://github.com/cli/cli/releases/tag/v2.78.0
Steps to reproduce the behavior
@actions/cachewith the same key across multiple branches. (I have created a testing repository, which can be used as a starting point https://github.com/luxass/gh-cache-test)gh cache listgh cache deletewhich prints that one cache was successfully deleted.Expected vs actual behavior
I would expect that it prints the correct number of caches that was deleted.
Additional Context
The REST Api supports returning the list of deleted caches when using a cache-key.
https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key
So there should probably be some conditional output, since the delete by cache-id returns a 204 status code.
Logs
Paste the activity from your command line. Redact if needed.