npx knip

Category: Node.js & npm/yarn

npx knip

Find unused dependencies and files

Scans the project and reports dependencies, exports, and files that nothing imports, shrinking install size and bundle output. Knip understands most bundler and framework conventions out of the box. Pair it with npx depcheck for a second opinion.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.