Skip to content

Catalogs

Catalogs let you define dependency version ranges once and reference them across workspaces in a monorepo. Knip reports catalog entries that are defined but no longer referenced, and references to entries that do not exist. It can remove unused entries with auto-fix.

Knip reads catalogs from the first applicable location:

  • pnpm-workspace.yaml — the catalog (default) and catalogs (named) keys
  • .yarnrc.yml — the catalog and catalogs keys
  • package.json — the catalog and catalogs keys
  • package.json#workspaces — the catalog and catalogs keys (Bun)

A catalog entry is reported as unused when no workspace references it through the catalog: protocol in its package.json:

packages/app/package.json
{
"dependencies": {
"react": "catalog:",
"zod": "catalog:validation"
}
}

catalog: references the default catalog, while catalog:validation references the named validation catalog. References are resolved from dependencies, devDependencies, peerDependencies, optionalDependencies, resolutions and pnpm.overrides.

Entries defined in a catalog but not referenced anywhere are reported as unused catalog entries.

A catalog: reference is reported when the selected catalog does not define that package. These issues point to the consuming package.json, where package managers would otherwise fail to resolve the version.

The catalog and catalogReferences issue types are included by the --dependencies shortcut. Focus on them (or exclude them) like any other issue type:

Terminal window
knip --include catalog,catalogReferences
knip --exclude catalog,catalogReferences

Auto-fix removes unused catalog entries from the catalog file:

Terminal window
knip --fix --fix-type catalog

ISC License © 2026Lars Kappert