1 ---
2 title: removal
3 section: 7
4 description: Cleaning the Slate
5 github_repo: npm/cli
6 github_branch: release/v10
7 github_path: docs/lib/content/using-npm/removal.md
8 redirect_from:
9 - /cli-documentation/v10/misc/removal
10 - /cli-documentation/v10/misc/removing-npm
11 - /cli-documentation/v10/using-npm/removal
12 - /cli-documentation/v10/using-npm/removing-npm
13 - /cli/v10/misc/removal
14 - /cli/v10/misc/removing-npm
15 - /cli/v10/using-npm/removing-npm
16 ---
17
18 ### Synopsis
19
20 So sad to see you go.
21
22 ```bash
23 sudo npm uninstall npm -g
24 ```
25
26 Or, if that fails, please proceed to more severe uninstalling methods.
27
28 ### More Severe Uninstalling
29
30 Usually, the above instructions are sufficient. That will remove npm, but leave behind anything you've installed.
31
32 If that doesn't work, or if you require more drastic measures, continue reading.
33
34 Note that this is only necessary for globally-installed packages. Local installs are completely contained within a project's `node_modules` folder. Delete that folder, and everything is gone unless a package's install script is particularly ill-behaved.
35
36 This assumes that you installed node and npm in the default place. If you configured node with a different `--prefix`, or installed npm with a different prefix setting, then adjust the paths accordingly, replacing `/usr/local` with your install prefix.
37
38 To remove everything npm-related manually:
39
40 ```bash
41 rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
42 ```
43
44 If you installed things _with_ npm, then your best bet is to uninstall them with npm first, and then install them again once you have a proper install. This can help find any symlinks that are lying around:
45
46 ```bash
47 ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
48 ```
49
50 Prior to version 0.3, npm used shim files for executables and node modules. To track those down, you can do the following:
51
52 ```bash
53 find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
54 ```
55
56 ### See also
57
58 - [npm uninstall](/cli/v10/commands/npm-uninstall)
59 - [npm prune](/cli/v10/commands/npm-prune)