npm-uninstall.1 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .TH "NPM\-UNINSTALL" "1" "August 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-uninstall\fR \- Remove a package
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm uninstall [<@scope>/]<pkg>[@<version>]\.\.\. [\-S|\-\-save|\-D|\-\-save\-dev|\-O|\-\-save\-optional|\-\-no\-save]
  9. aliases: remove, rm, r, un, unlink
  10. .fi
  11. .RE
  12. .SS Description
  13. .P
  14. This uninstalls a package, completely removing everything npm installed
  15. on its behalf\.
  16. .P
  17. Example:
  18. .P
  19. .RS 2
  20. .nf
  21. npm uninstall sax
  22. .fi
  23. .RE
  24. .P
  25. In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command),
  26. it uninstalls the current package context as a global package\.
  27. .P
  28. \fBnpm uninstall\fP takes 3 exclusive, optional flags which save or update
  29. the package version in your main package\.json:
  30. .RS 0
  31. .IP \(bu 2
  32. \fB\-S, \-\-save\fP: Package will be removed from your \fBdependencies\fP\|\.
  33. .IP \(bu 2
  34. \fB\-D, \-\-save\-dev\fP: Package will be removed from your \fBdevDependencies\fP\|\.
  35. .IP \(bu 2
  36. \fB\-O, \-\-save\-optional\fP: Package will be removed from your \fBoptionalDependencies\fP\|\.
  37. .IP \(bu 2
  38. \fB\-\-no\-save\fP: Package will not be removed from your \fBpackage\.json\fP file\.
  39. .RE
  40. .P
  41. Further, if you have an \fBnpm\-shrinkwrap\.json\fP then it will be updated as
  42. well\.
  43. .P
  44. Scope is optional and follows the usual rules for npm help \fBscope\fP\|\.
  45. .P
  46. Examples:
  47. .P
  48. .RS 2
  49. .nf
  50. npm uninstall sax \-\-save
  51. npm uninstall @myorg/privatepackage \-\-save
  52. npm uninstall node\-tap \-\-save\-dev
  53. npm uninstall dtrace\-provider \-\-save\-optional
  54. npm uninstall lodash \-\-no\-save
  55. .fi
  56. .RE
  57. .SS See Also
  58. .RS 0
  59. .IP \(bu 2
  60. npm help prune
  61. .IP \(bu 2
  62. npm help install
  63. .IP \(bu 2
  64. npm help folders
  65. .IP \(bu 2
  66. npm help config
  67. .IP \(bu 2
  68. npm help npmrc
  69. .RE