Skip to content

Instantly share code, notes, and snippets.

@wpbonelli
Last active October 18, 2022 17:45
Show Gist options
  • Save wpbonelli/f84a18e985eb43175a7c0eecdb442d3f to your computer and use it in GitHub Desktop.
Save wpbonelli/f84a18e985eb43175a7c0eecdb442d3f to your computer and use it in GitHub Desktop.

Delete all Actions cache entries with GitHub CLI

A convenient one liner to empty all caches for a repository.

Installing the actions-cache extension

The gh CLI and actions-cache extension must be installed. To install the extension, run:

 gh extension install actions/gh-actions-cache

Deleting all cache entries

Bash

gh actions-cache list | tail -n +5 | cut -f1 | xargs -I@ gh actions-cache delete @ --confirm

Powershell

TODO

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