LinuxCommandLibrary

gh-cache

manage GitHub Actions workflow caches

TLDR

List caches

$ gh cache list
copy
Delete a cache
$ gh cache delete [cache_id]
copy
Delete caches by key
$ gh cache delete --key [key_prefix]
copy
Delete all caches
$ gh cache delete --all
copy

SYNOPSIS

gh cache command [options]

DESCRIPTION

gh cache manages GitHub Actions caches for a repository. Caches store dependencies and build artifacts to speed up workflow execution by reusing data between runs.
The cache system uses key-based storage, where workflows save and restore cached data using unique keys. Cache entries have size limits and are automatically evicted based on usage policies. Managing caches manually helps troubleshoot workflow issues and reclaim storage.
Deleting caches can be necessary when dependencies change or to force rebuilds with fresh data.

PARAMETERS

--key prefix

Filter by key prefix.
--all
Delete all caches.
-R, --repo owner/repo
Repository.

SUBCOMMANDS

list

List caches.
delete
Delete caches.

SEE ALSO

gh(1), gh-run(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community