403 Error: “Private repository storage limit reached” — quota shows space remaining

It looks like you’re encountering a quota discrepancy issue on Hugging Face, where your storage limit error doesn’t match the actual usage shown in the UI. This has been reported by other users as well43dcd9a7-70db-4a1f-b0ae-981daa162054.

Possible Causes

  1. Hidden Large Files (LFS) – Some files tracked via Git Large File Storage (LFS) may not be counted in the UI but still contribute to the storage limit.
  2. Stale Storage Calculation – The quota display might not be updating in real-time, leading to outdated usage stats.
  3. Repository-Level Limits – Even if your organization has space left, individual repositories may have separate limits.
  4. Force Push Issues – If you’ve been force-pushing updates, old files may still be counted in storage even if they’re not visible.

Potential Fixes

  • Check LFS Usage: Run this in Python to manually compute LFS file sizes:
    from huggingface_hub import HfApi
    api = HfApi()
    lfs_files = list(api.list_lfs_files(repo_id="your_repo", repo_type="dataset"))
    total_size = sum(file.size for file in lfs_files)
    print(f"Total LFS storage used: {total_size / (1024**3)} GB")
    
  • Delete Unused Large Files: If LFS files are taking up space, remove them using:
    git lfs prune
    
  • Contact Hugging Face Support: If the issue persists, reach out via their GitHub issue tracker or Hugging Face forums.

Let me know if you need help troubleshooting further! :rocket: