Welcome to mirror list, hosted at ThFree Co, Russian Federation.

npm-prune.1 « man1 « man « npm « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 337546353f81b65de5e357ba29da30b3a748d840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.TH "NPM\-PRUNE" "1" "March 2021" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SS Synopsis
.P
.RS 2
.nf
npm prune [[<@scope>/]<pkg>\.\.\.] [\-\-production] [\-\-dry\-run] [\-\-json]
.fi
.RE
.SS Description
.P
This command removes "extraneous" packages\.  If a package name is provided,
then only packages matching one of the supplied names are removed\.
.P
Extraneous packages are those present in the \fBnode_modules\fP folder that are
not listed as any package's dependency list\.
.P
If the \fB\-\-production\fP flag is specified or the \fBNODE_ENV\fP environment
variable is set to \fBproduction\fP, this command will remove the packages
specified in your \fBdevDependencies\fP\|\. Setting \fB\-\-no\-production\fP will negate
\fBNODE_ENV\fP being set to \fBproduction\fP\|\.
.P
If the \fB\-\-dry\-run\fP flag is used then no changes will actually be made\.
.P
If the \fB\-\-json\fP flag is used, then the changes \fBnpm prune\fP made (or would
have made with \fB\-\-dry\-run\fP) are printed as a JSON object\.
.P
In normal operation, extraneous modules are pruned automatically, so you'll
only need this command with the \fB\-\-production\fP flag\.  However, in the real
world, operation is not always "normal"\.  When crashes or mistakes happen,
this command can help clean up any resulting garbage\.
.SS See Also
.RS 0
.IP \(bu 2
npm help uninstall
.IP \(bu 2
npm help folders
.IP \(bu 2
npm help ls

.RE