Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Well, to give a complete answer to this question, there are two methods:   (for example we call the installed module as module1):

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

Well to give a complete answer to this question, there are two methods: (for example we call the installed module as module1)

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

Well, to give a complete answer to this question, there are two methods  (for example we call the installed module as module1):

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

edited body
Source Link
Ehsan
  • 1.3k
  • 11
  • 20

Well to give a complete answer to this question, there are two methods: (for example we call the installed module as module1)

  1. To remove module1 without changing package.json:

    npm uninstall module1npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

Well to give a complete answer to this question, there are two methods: (for example we call the installed module as module1)

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

Well to give a complete answer to this question, there are two methods: (for example we call the installed module as module1)

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall

Source Link
Ehsan
  • 1.3k
  • 11
  • 20

Well to give a complete answer to this question, there are two methods: (for example we call the installed module as module1)

  1. To remove module1 without changing package.json:

    npm uninstall module1

  2. To remove module1 with changing package.json, and removing it from the dependencies in package.json:

    npm uninstall --save module1

Note: to simplify the above mentioned commands, you can use -S instead of --save , and can use remove, rm, r, un, unlink instead of uninstall