hf repos ls lists repositories by storage usage
Introduced 2026-05-28 · score 0.96
HOW TO USE IT
When inspecting Hub repositories and storage usage, run `hf repos ls`; add filters for the repositories you need, and use `--limit 0` to include all results. Use `--format json` when scripting or `-q` for IDs only.
hf repos lshf repos ls --namespace <org> --type dataset --search <query> --limit 0 --format json | jq '.[].id'hf repos ls -qWHY THIS HELPS
Inspect Hub repositories and their storage usage while reviewing or maintaining repository assets.
REQUIREMENTS AND LIMITATIONS
- Version: v1.17.0
- --namespace <org>: Organization name; if omitted, lists repositories for the authenticated user.
- --type <model|dataset|space|bucket>: Filter by repository type. The docs do not say these values are mutually exclusive.
- --search <query>: Search repository names.
- --limit <integer>: Set the maximum number of results; default is 30, and 0 lists all results.
- --format <value>: Choose output format: `auto` (default), `human`, `agent`, `json`, or `quiet`.
- -q, --quiet: Equivalent to `--format quiet`; prints IDs only, one per line.
- Prerequisite: Install the `hf` CLI; the docs list the standalone installer, `huggingface_hub` package, and Homebrew. The CLI is included with `huggingface_hub`.
- Prerequisite: To list the authenticated user's repositories, authenticate with `hf auth login`; the docs do not specify a required token scope for listing.
- The default limit is 30.
- Results include models, datasets, spaces, and buckets, with storage size and percentage of namespace total, sorted by storage usage.
FIRST-PARTY EVIDENCE
- https://github.com/huggingface/huggingface_hub/releases/tag/v1.17.0
- https://github.com/huggingface/huggingface_hub/blob/v1.17.0/docs/source/en/guides/cli.md
- https://github.com/huggingface/huggingface_hub/blob/v1.17.0/src/huggingface_hub/cli/repos.py
Check the installed version and the source before using it. Entry JSON