Node Modules

~/node_modules stores JavaScript packages installed by Node.js tools and projects so apps, scripts, and build workflows can use their dependencies.

What is Node Modules?

~/node_modules is a folder used by the Node.js ecosystem to store installed JavaScript and TypeScript packages. Developers encounter it when working with npm, Yarn, pnpm, command-line tools, local project dependencies, and global packages placed under the home folder. Its contents can include libraries required to run development servers, build websites, test code, compile assets, and support automation scripts. Some tools recreate this folder automatically from a package manifest and lockfile, while others may contain custom edits, generated binaries, or packages installed outside a specific project. On macOS, this kind of folder is common in development environments and can consume substantial disk space when many packages or multiple versions are installed.

Review files before deleting with diCleaner

Inspect caches, support files, folders, and related data before deleting items on Mac.

Download diCleaner

Safety overview

Status: Use with caution

This folder is not a standard macOS system folder, but it is commonly used by Node.js development tools. Deleting it will not harm macOS itself, but it can break JavaScript projects, local developer tools, and command-line workflows until packages are reinstalled. Some packages include executable scripts or native modules, so you should only remove it if you recognize it as unused development data. Check whether you still use Node.js, npm, Yarn, pnpm, or any projects that depend on packages stored in ~/node_modules.

Recommendation: Keep this folder if you actively use Node.js development tools or projects from your account. If you no longer do JavaScript or TypeScript development, you can remove it to recover space, but expect related tools or projects to stop working until you reinstall their dependencies. If you are unsure, inspect the folder contents and recent project activity before deleting it.

File path

  • ~/node_modules

Share your experience

Be the first to share your experience.

Share your experience with this file or folder