Skip to content

Instantly share code, notes, and snippets.

@sidey79
Last active April 14, 2024 08:07
Show Gist options
  • Save sidey79/a7e582c8e575487a2bef5c11eeefb098 to your computer and use it in GitHub Desktop.
Save sidey79/a7e582c8e575487a2bef5c11eeefb098 to your computer and use it in GitHub Desktop.
Uses Github CLI to delete up to 150 buildkit-blob cache entrys, in a single branch
BRANCH="refs/heads/dev"
MAX_Delete=150
gh cache list -r "${BRANCH}" -L ${MAX_Delete} -k buildkit-blob- | cut -f2 | xargs -I {} gh cache delete {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment