Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-uninstall.1160 linesDownload Raw Back to man1
1.TH "NPM-UNINSTALL" "1" "April 2026" "NPM@11.13.0" ""
2.SH "NAME"
3\fBnpm-uninstall\fR - Remove a package
4.SS "Synopsis"
5.P
6.RS 2
7.nf
8npm uninstall \[lB]<@scope>/\[rB]<pkg>...
9
10aliases: unlink, remove, rm, r, un
11.fi
12.RE
13.SS "Description"
14.P
15This uninstalls a package, completely removing everything npm installed on its behalf.
16.P
17It also removes the package from the \fBdependencies\fR, \fBdevDependencies\fR, \fBoptionalDependencies\fR, and \fBpeerDependencies\fR objects in your \fBpackage.json\fR.
18.P
19Further, if you have an \fBnpm-shrinkwrap.json\fR or \fBpackage-lock.json\fR, npm will update those files as well.
20.P
21\fB--no-save\fR will tell npm not to remove the package from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files.
22.P
23\fB--save\fR or \fB-S\fR will tell npm to remove the package from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, and \fBpackage-lock.json\fR files. This is the default, but you may need to use this if you have for instance \fBsave=false\fR in your \fBnpmrc\fR file
24.P
25In global mode (ie, with \fB-g\fR or \fB--global\fR appended to the command), it uninstalls the current package context as a global package. \fB--no-save\fR is ignored in this case.
26.P
27Scope is optional and follows the usual rules for npm help scope.
28.SS "Examples"
29.P
30.RS 2
31.nf
32npm uninstall sax
33.fi
34.RE
35.P
36\fBsax\fR will no longer be in your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files.
37.P
38.RS 2
39.nf
40npm uninstall lodash --no-save
41.fi
42.RE
43.P
44\fBlodash\fR will not be removed from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files.
45.SS "Configuration"
46.SS "\fBsave\fR"
47.RS 0
48.IP \(bu 4
49Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR
50.IP \(bu 4
51Type: Boolean
52.RE 0
53
54.P
55Save installed packages to a \fBpackage.json\fR file as dependencies.
56.P
57When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR.
58.P
59Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR.
60.SS "\fBglobal\fR"
61.RS 0
62.IP \(bu 4
63Default: false
64.IP \(bu 4
65Type: Boolean
66.RE 0
67
68.P
69Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior.
70.RS 0
71.IP \(bu 4
72packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory.
73.IP \(bu 4
74bin files are linked to \fB{prefix}/bin\fR
75.IP \(bu 4
76man pages are linked to \fB{prefix}/share/man\fR
77.RE 0
78
79.SS "\fBworkspace\fR"
80.RS 0
81.IP \(bu 4
82Default:
83.IP \(bu 4
84Type: String (can be set multiple times)
85.RE 0
86
87.P
88Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
89.P
90Valid values for the \fBworkspace\fR config are either:
91.RS 0
92.IP \(bu 4
93Workspace names
94.IP \(bu 4
95Path to a workspace directory
96.IP \(bu 4
97Path to a parent workspace directory (will result in selecting all workspaces within that folder)
98.RE 0
99
100.P
101When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project.
102.P
103This value is not exported to the environment for child processes.
104.SS "\fBworkspaces\fR"
105.RS 0
106.IP \(bu 4
107Default: null
108.IP \(bu 4
109Type: null or Boolean
110.RE 0
111
112.P
113Set to true to run the command in the context of \fBall\fR configured workspaces.
114.P
115Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly:
116.RS 0
117.IP \(bu 4
118Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config.
119.RE 0
120
121.P
122This value is not exported to the environment for child processes.
123.SS "\fBinclude-workspace-root\fR"
124.RS 0
125.IP \(bu 4
126Default: false
127.IP \(bu 4
128Type: Boolean
129.RE 0
130
131.P
132Include the workspace root when workspaces are enabled for a command.
133.P
134When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project.
135.P
136This value is not exported to the environment for child processes.
137.SS "\fBinstall-links\fR"
138.RS 0
139.IP \(bu 4
140Default: false
141.IP \(bu 4
142Type: Boolean
143.RE 0
144
145.P
146When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces.
147.SS "See Also"
148.RS 0
149.IP \(bu 4
150npm help prune
151.IP \(bu 4
152npm help install
153.IP \(bu 4
154npm help folders
155.IP \(bu 4
156npm help config
157.IP \(bu 4
158npm help npmrc
159.RE 0
160 
codekingpro/portable-devtools · Team Ai