cli/cli · error

%s No caches to delete

Error message

%s No caches to delete

What it means

Error "%s No caches to delete" thrown in cli/cli.

Source

Thrown at pkg/cmd/cache/delete/delete.go:146

		return fmt.Errorf("failed to determine base repo: %w", err)
	}

	var toDelete []string
	if opts.DeleteAll {
		opts.IO.StartProgressIndicator()
		caches, err := shared.GetCaches(client, repo, shared.GetCachesOptions{Limit: -1, Ref: opts.Ref})
		opts.IO.StopProgressIndicator()
		if err != nil {
			return err
		}
		if len(caches.ActionsCaches) == 0 {
			if opts.SucceedOnNoCaches {
				if opts.IO.IsStdoutTTY() {
					fmt.Fprintf(opts.IO.Out, "%s No caches to delete\n", opts.IO.ColorScheme().SuccessIcon())
				}
				return nil
			} else {
				return fmt.Errorf("%s No caches to delete", opts.IO.ColorScheme().FailureIcon())
			}
		}
		for _, cache := range caches.ActionsCaches {
			toDelete = append(toDelete, strconv.FormatInt(cache.Id, 10))
		}
	} else {
		toDelete = append(toDelete, opts.Identifier)
	}

	return deleteCaches(opts, client, repo, toDelete)
}

func deleteCaches(opts *DeleteOptions, client *api.Client, repo ghrepo.Interface, toDelete []string) error {
	cs := opts.IO.ColorScheme()
	repoName := ghrepo.FullName(repo)
	opts.IO.StartProgressIndicator()

	totalDeleted := 0

View on GitHub (pinned to 0eeec0b92e)

Solutions

  1. There is nothing to delete; verify caches exist with `gh cache list` first.

When it happens

Trigger: Thrown at pkg/cmd/cache/delete/delete.go:146 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cli/cli@0eeec0b92e (2026-08-15). Data as JSON: /api/errors/ccbf33d1636640a5. Report an issue: GitHub.