1 ---
2 title: npm-stop
3 section: 1
4 description: Stop a package
5 github_repo: npm/cli
6 github_branch: release/v7
7 github_path: docs/content/commands/npm-stop.md
8 redirect_from:
9 - /cli-documentation/v7/cli-commands/npm-stop
10 - /cli-documentation/v7/cli-commands/stop
11 - /cli-documentation/v7/commands/npm-stop
12 - /cli-documentation/v7/commands/stop
13 - /cli-documentation/v7/npm-stop
14 - /cli-documentation/v7/stop
15 - /cli/v7/cli-commands/npm-stop
16 - /cli/v7/cli-commands/stop
17 - /cli/v7/commands/stop
18 - /cli/v7/npm-stop
19 - /cli/v7/stop
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm stop [-- <args>]
26 ```
27
28 ### Description
29
30 This runs a predefined command specified in the "stop" property of a package's "scripts" object.
31
32 Unlike with [npm start](/cli/v7/commands/npm-start), there is no default script that will run if the `"stop"` property is not defined.
33
34 ### Example
35
36 ```json
37 {
38 "scripts": {
39 "stop": "node bar.js"
40 }
41 }
42 ```
43
44 ```bash
45 npm stop
46
47 > npm@x.x.x stop
48 > node bar.js
49
50 (bar.js output would be here)
51
52 ```
53
54 ### Configuration
55
56 #### `ignore-scripts`
57
58 - Default: false
59 - Type: Boolean
60
61 If true, npm does not run scripts specified in package.json files.
62
63 Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
64
65 #### `script-shell`
66
67 - Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
68 - Type: null or String
69
70 The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
71
72 ### See Also
73
74 - [npm run-script](/cli/v7/commands/npm-run-script)
75 - [npm scripts](/cli/v7/using-npm/scripts)
76 - [npm test](/cli/v7/commands/npm-test)
77 - [npm start](/cli/v7/commands/npm-start)
78 - [npm restart](/cli/v7/commands/npm-restart)