Short version, I ran Knip across our Nx repo, took the “unused” list as a hint, deleted candidates, built, tested, booted apps, and put a few back when they were secretly used. Net, about 120 packages gone. Yarn install dropped by roughly a minute. Fewer CVE nags. Everyone slept better.the situationWe got a chunky Nx monorepo. Roughly 500 deps scattered across apps and packages/libs, not all living in the root. Installs felt slow. Security alerts felt noisy. I wanted to clean house without breaking anything or making dev life worse.why i ditched depcheck and tried knipI used to reach for depcheck. It’s been on life support for years and doesn’t love modern setups. Knip looked current, understands monorepos, and actually sniffs entry points for common stacks. Depcheck recommends it too. It builds a little graph from imports and config refs, then compares it to package.json. Good enough for a first pass.what i actually didBaseline scan first:yarn dlx knipThen I ran the usual suspects to see what would scream if I yanked packages:yarn nx affected -t build test lint yarn nx run <app>:serve Knip’s pass flagged a ton of stuff on the first scan. About 40% of what it called “unused” turned out to be false positives in my setup. Totally fine, that’s expected.how i treated the resultsKnip is a signal, not the judge. For each package it flagged:uninstall itbuild, test, lint, e2e, codegen/typegen, and then boot the owning appif something broke, put it back and document why in my Knip ignore listMost of the false positives were “used but not imported” stuff:strings in config files, for example Jest preset or runner namesCLI tools only used in scripts or CIplugin discovery patternstype-only or toolchain stuffI kept a running ignore list with little comments so future me/dev isn’t confused.the knip setupI made the config monorepo-aware and added a few ignores that always trip scanners in our stack. Yours will vary, but this is just a taste without exposing too much: const config =...
First seen: 2025-09-29 02:30
Last seen: 2025-09-29 15:33