DEV Community

alyson farias
alyson farias

Posted on

2 2

Identifique e apague todas node_modules com NP Kill

Eu sei, você trabalha com Javascript, e precisa de instalar variadas dependências.
O problema é que com o passar do tempo você se depara com vários projetos consumindo sua memória sem necessidade, pois precisamos do projeto vez ou outra, mas não do node_modules(a pasta mais pesada) necessariamente.

O Npkill faz uma varredura em todo computador identificando as pastas node_modules e possibilita a exclusão ao pressionar [SPACE]
via CLI.

Image description

Instalação

Você não precisa necessariamente instalar, pode simplesmente usar o comando abaixo
npx kill

Ou caso quiser instalar
npm i -g npkill
#caso use Linux talvez precise utilizar sudo, cuidado.

Logo após
npkill

Referência:
https://www.npmjs.com/package/npkill

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️