Delete all npm packages or plugins (dependencies) in React or React Native

Tiempo de lectura: < 1 minuto

Reading time: < 1 minute

If we want to delete the project-level (not global) installed dependencies within our React project, we need to do the following:

  1. Delete the folder called node_modules.
    rm node_modules
  2. Delete package-lock.json:
    rm package-lock.json

Now, if we want to reinstall the dependencies, we need to execute:

npm install

This way, we can restore the dependencies of our project.

Leave a Comment