{
  "slug": "hf-cache-rm-removes-an-individual-cached-file-1ab2da19fe7e",
  "title": "hf cache rm removes an individual cached file",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-17T10:21:24.000Z",
  "announced_at": "2026-09-17T10:21:24.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need to remove one exact cached file while keeping the repo cache usable, pass its `hf://` file URI to `hf cache rm`; it removes that file from every cached revision and deletes its blob only when no other cached file references it. The path must be exact, and file targets cannot be mixed with repository or revision targets.",
    "examples": [
      "hf cache rm hf://models/<owner>/<repo>/<exact-file-path> --dry-run"
    ],
    "gotchas": [
      "Version: v1.32.0",
      "TARGETS... (required): One or more repo IDs, `hf://` URIs, or revision hashes to delete; for this task, use one exact `hf://` file URI.",
      "--dry-run: Preview deletions without removing anything.",
      "--cache-dir TEXT: Cache directory to scan; defaults to the Hugging Face cache.",
      "-y, --yes: Skip the confirmation prompt.",
      "Paths must match exactly; folders and glob patterns are not supported.",
      "File targets cannot be mixed with repositories or revisions in the same call.",
      "`@revision` in `hf://` URIs is rejected.",
      "Refs and snapshot folders are kept.",
      "A deleted file is downloaded again the next time it is needed."
    ]
  },
  "why_it_matters": "Remove one cached file such as a GGUF quantization while keeping the rest of its repository cache usable.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.32.0",
    "https://github.com/huggingface/huggingface_hub/pull/4847",
    "https://huggingface.co/docs/huggingface_hub/v1.32.0/guides/manage-cache",
    "https://huggingface.co/docs/huggingface_hub/package_reference/cli"
  ],
  "rank": 0.98034,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-ce6b9d1ca4312a65-8:gate",
    "evidence_hash": "6ed38e3981f16aa5af27f57ebb3caa09482c2e8f2c23a4fa1336d9ccaaf35212"
  },
  "review": {
    "draft_hash": "2f7bbbf6a266c6b51aa20faeffb5ee65f8f797f41eb796ddcd5a0d695358d650",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
