1 ---
2 title: npm-restart
3 section: 1
4 description: Restart a package
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/commands/npm-restart.md
8 redirect_from:
9 - /cli-commands/npm-restart
10 - /cli-commands/restart
11 - /cli-documentation/cli-commands/npm-restart
12 - /cli-documentation/cli-commands/restart
13 - /cli-documentation/commands/npm-restart
14 - /cli-documentation/commands/restart
15 - /cli-documentation/npm-restart
16 - /cli-documentation/restart
17 - /cli-documentation/v11/cli-commands/npm-restart
18 - /cli-documentation/v11/cli-commands/restart
19 - /cli-documentation/v11/commands/npm-restart
20 - /cli-documentation/v11/commands/restart
21 - /cli-documentation/v11/npm-restart
22 - /cli-documentation/v11/restart
23 - /cli/cli-commands/npm-restart
24 - /cli/cli-commands/restart
25 - /cli/commands/npm-restart
26 - /cli/commands/restart
27 - /cli/npm-restart
28 - /cli/restart
29 - /cli/v11/cli-commands/npm-restart
30 - /cli/v11/cli-commands/restart
31 - /cli/v11/commands/restart
32 - /cli/v11/npm-restart
33 - /cli/v11/restart
34 - /commands/npm-restart
35 - /commands/restart
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm restart [-- <args>]
42 ```
43
44 ### Description
45
46 This restarts a project. It is equivalent to running `npm run restart`.
47
48 If the current project has a `"restart"` script specified in `package.json`, then the following scripts will be run:
49
50 1. prerestart
51 2. restart
52 3. postrestart
53
54 If it does _not_ have a `"restart"` script specified, but it does have `stop` and/or `start` scripts, then the following scripts will be run:
55
56 1. prerestart
57 2. prestop
58 3. stop
59 4. poststop
60 5. prestart
61 6. start
62 7. poststart
63 8. postrestart
64
65 ### Configuration
66
67 #### `ignore-scripts`
68
69 - Default: false
70 - Type: Boolean
71
72 If true, npm does not run scripts specified in package.json files.
73
74 Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
75
76 #### `script-shell`
77
78 - Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
79 - Type: null or String
80
81 The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <package-spec>` commands.
82
83 ### See Also
84
85 - [npm run](/cli/v11/commands/npm-run)
86 - [npm scripts](/cli/v11/using-npm/scripts)
87 - [npm test](/cli/v11/commands/npm-test)
88 - [npm start](/cli/v11/commands/npm-start)
89 - [npm stop](/cli/v11/commands/npm-stop)
90 - [npm restart](/cli/v11/commands/npm-restart)