Skip to content

Commit 57a5bbc

Browse files
committed
fix(docs): re-add --save and explanation of when it is useful
1 parent 4076d39 commit 57a5bbc

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

docs/content/commands/npm-uninstall.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Remove a package
77
### Synopsis
88

99
```bash
10-
npm uninstall [<@scope>/]<pkg>[@<version>]... [--no-save]
10+
npm uninstall [<@scope>/]<pkg>[@<version>]... [--save|--no-save]
1111

1212
aliases: remove, rm, r, un, unlink
1313
```
@@ -24,9 +24,13 @@ It also removes the package from the `dependencies`, `devDependencies`,
2424
Futher, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm
2525
will update those files as well.
2626

27-
`npm uninstall` takes one optional flag, `--no-save` which will tell npm
28-
not to remove the package from your `package.json`,
29-
`npm-shrinkwrap.json`, or `package-lock.json` files
27+
`--no-save` will tell npm not to remove the package from your
28+
`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files.
29+
30+
`--save` will tell npm to remove the package from your `package.json`,
31+
`npm-shrinkwrap.json`, and `package-lock.json` files. This is the
32+
default, but may be needed if you have for instance `save=false` in your
33+
`npmrc` file
3034

3135
In global mode (ie, with `-g` or `--global` appended to the command),
3236
it uninstalls the current package context as a global package.

lib/uninstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const completion = require('./utils/completion/installed-shallow.js')
99

1010
const usage = usageUtil(
1111
'uninstall',
12-
'npm uninstall [<@scope>/]<pkg>[@<version>]... [--no-save]'
12+
'npm uninstall [<@scope>/]<pkg>[@<version>]... [--save, --no-save]'
1313
)
1414

1515
const cmd = (args, cb) => rm(args).then(() => cb()).catch(cb)

0 commit comments

Comments
 (0)