# Deleted Node Modules of NodeJS

**URL:** <https://forum.freecodecamp.org/t/deleted-node-modules-of-nodejs/802066>\
**Category:** I Love Programming\
**Created:** [October 10, 2026, 2:21pm UTC](https://forum.freecodecamp.org/t/deleted-node-modules-of-nodejs/802066 "2026-10-10T14:21:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulyorde26](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/paulyorde26/32/422544_2.png) [@paulyorde26](https://forum.freecodecamp.org/u/paulyorde26)\
**Post date:** [October 10, 2026, 2:21pm UTC](https://forum.freecodecamp.org/t/deleted-node-modules-of-nodejs/802066/1 "2026-10-10T14:21:36Z")

</div>

I used the ‘npkill’ console app to delete and clean up the numerous node modules packages from my practice projects just sitting on my machine. I went to far and deleted the NodeJS node modules packages. What’s the best way to handle this? It seems I can’t just install/uninstall given that the brain has been removed 🙂

---

<div class="post-metadata">

**Author:** ![aikotanaka85](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@aikotanaka85](https://forum.freecodecamp.org/u/aikotanaka85)\
**Post date:** [October 10, 2026, 3:40pm UTC](https://forum.freecodecamp.org/t/deleted-node-modules-of-nodejs/802066/2 "2026-10-10T15:40:49Z")

</div>

As long as you still have `package.json` in the project directory, you can restore all dependencies without reinstalling Node.js.

Navigate to the project directory and run:

```bash
npm install

```

npm will read `package.json` and regenerate the `node_modules` folder with the required packages.

If you have a `package-lock.json` file, you can run:

```bash
npm ci

```

`npm ci` does a clean install directly from your lockfile, which is faster and ensures the exact dependency versions are restored.

---

<div class="post-metadata">

**Author:** ![paulyorde26](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/paulyorde26/32/422544_2.png) [@paulyorde26](https://forum.freecodecamp.org/u/paulyorde26)\
**Post date:** [October 10, 2026, 10:00pm UTC](https://forum.freecodecamp.org/t/deleted-node-modules-of-nodejs/802066/3 "2026-10-10T22:00:33Z")

</div>

Ah. I’m using nvm. Apparently npkill zapped the json files as well.
