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 can remove them 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.

The catalog issue type is included by the --dependencies shortcut. Focus on it (or exclude it) like any other issue type:

Terminal window
knip --include catalog
knip --exclude catalog

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

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

ISC License © 2026 Lars Kappert