1 ---
2 title: npm-rebuild
3 section: 1
4 description: Rebuild a package
5 github_repo: npm/cli
6 github_branch: release/v6
7 github_path: docs/content/commands/npm-rebuild.md
8 redirect_from:
9 - /cli-documentation/v6/cli-commands/npm-rebuild
10 - /cli-documentation/v6/cli-commands/rebuild
11 - /cli-documentation/v6/commands/npm-rebuild
12 - /cli-documentation/v6/commands/rebuild
13 - /cli-documentation/v6/npm-rebuild
14 - /cli-documentation/v6/rebuild
15 - /cli/v6/cli-commands/npm-rebuild
16 - /cli/v6/cli-commands/rebuild
17 - /cli/v6/commands/rebuild
18 - /cli/v6/npm-rebuild
19 - /cli/v6/rebuild
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm rebuild [[<@scope>/<name>]...]
26
27 alias: npm rb
28 ```
29
30 ### Description
31
32 This command runs the `npm build` command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.
33
34 ### See Also
35
36 - [npm build](/cli/v6/commands/npm-build)
37 - [npm install](/cli/v6/commands/npm-install)