{"record":{"id":"ccbf33d1636640a5","repo":"cli/cli","slug":"s-no-caches-to-delete","errorCode":null,"errorMessage":"%s No caches to delete","messagePattern":"(.+?) No caches to delete","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/cache/delete/delete.go","lineNumber":146,"sourceCode":"\t\treturn fmt.Errorf(\"failed to determine base repo: %w\", err)\n\t}\n\n\tvar toDelete []string\n\tif opts.DeleteAll {\n\t\topts.IO.StartProgressIndicator()\n\t\tcaches, err := shared.GetCaches(client, repo, shared.GetCachesOptions{Limit: -1, Ref: opts.Ref})\n\t\topts.IO.StopProgressIndicator()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(caches.ActionsCaches) == 0 {\n\t\t\tif opts.SucceedOnNoCaches {\n\t\t\t\tif opts.IO.IsStdoutTTY() {\n\t\t\t\t\tfmt.Fprintf(opts.IO.Out, \"%s No caches to delete\\n\", opts.IO.ColorScheme().SuccessIcon())\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"%s No caches to delete\", opts.IO.ColorScheme().FailureIcon())\n\t\t\t}\n\t\t}\n\t\tfor _, cache := range caches.ActionsCaches {\n\t\t\ttoDelete = append(toDelete, strconv.FormatInt(cache.Id, 10))\n\t\t}\n\t} else {\n\t\ttoDelete = append(toDelete, opts.Identifier)\n\t}\n\n\treturn deleteCaches(opts, client, repo, toDelete)\n}\n\nfunc deleteCaches(opts *DeleteOptions, client *api.Client, repo ghrepo.Interface, toDelete []string) error {\n\tcs := opts.IO.ColorScheme()\n\trepoName := ghrepo.FullName(repo)\n\topts.IO.StartProgressIndicator()\n\n\ttotalDeleted := 0","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/cache/delete/delete.go#L128-L164","documentation":"Error \"%s No caches to delete\" thrown in cli/cli.","triggerScenarios":"Thrown at pkg/cmd/cache/delete/delete.go:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["There is nothing to delete; verify caches exist with `gh cache list` first."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}