1 ---
2 title: Removal
3 section: 7
4 description: Cleaning the slate
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/using-npm/removal.md
8 redirect_from:
9 - /cli-documentation/misc/removal
10 - /cli-documentation/misc/removing-npm
11 - /cli-documentation/using-npm/removal
12 - /cli-documentation/using-npm/removing-npm
13 - /cli-documentation/v11/misc/removal
14 - /cli-documentation/v11/misc/removing-npm
15 - /cli-documentation/v11/using-npm/removal
16 - /cli-documentation/v11/using-npm/removing-npm
17 - /cli/misc/removal
18 - /cli/misc/removing-npm
19 - /cli/using-npm/removal
20 - /cli/using-npm/removing-npm
21 - /cli/v11/misc/removal
22 - /cli/v11/misc/removing-npm
23 - /cli/v11/using-npm/removing-npm
24 - /misc/removal
25 - /misc/removing-npm
26 - /using-npm/removal
27 - /using-npm/removing-npm
28 ---
29
30 ### Synopsis
31
32 So sad to see you go.
33
34 ```bash
35 sudo npm uninstall npm -g
36 ```
37
38 Or, if that fails, please proceed to more severe uninstalling methods.
39
40 ### More Severe Uninstalling
41
42 Usually, the above instructions are sufficient. That will remove npm, but leave behind anything you've installed.
43
44 If that doesn't work, or if you require more drastic measures, continue reading.
45
46 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.
47
48 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.
49
50 To remove everything npm-related manually:
51
52 ```bash
53 rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
54 ```
55
56 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:
57
58 ```bash
59 ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
60 ```
61
62 Prior to version 0.3, npm used shim files for executables and node modules. To track those down, you can do the following:
63
64 ```bash
65 find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
66 ```
67
68 ### See also
69
70 - [npm uninstall](/cli/v11/commands/npm-uninstall)
71 - [npm prune](/cli/v11/commands/npm-prune)