gh-cache - Man Page
Manage GitHub Actions caches
Examples (TL;DR)
- List caches for the current repository:
gh cache [ls|list] - List caches for a specific repository:
gh cache [ls|list] [-R|--repo] owner/repository - List caches with a specific cache key prefix:
gh cache [ls|list] [-k|--key] key_prefix - List caches for a specific branch:
gh cache [ls|list] [-r|--ref] refs/heads/branch_name - List caches sorted by least recently accessed:
gh cache [ls|list] [-S|--sort] last_accessed_at [-O|--order] asc - Delete a cache by id:
gh cache delete cache_id - Delete a cache by key:
gh cache delete cache_key - Delete all caches:
gh cache delete [-a|--all]
Synopsis
gh cache <command> [flags]
Description
Work with GitHub Actions caches.
Available Commands
- gh-cache-delete(1)
Delete GitHub Actions caches
- gh-cache-list(1)
List GitHub Actions caches
Options
- -R, --repo <[HOST/]OWNER/REPO>
Select another repository using the [HOST/]OWNER/REPO format
Exit Codes
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
Example
$ gh cache list $ gh cache delete --all
See Also
Referenced By
gh(1), gh-cache-delete(1), gh-cache-list(1).
Oct 2025 GitHub CLI manual