1 ---
2 title: removal
3 section: 7
4 description: Cleaning the Slate
5 github_repo: npm/cli
6 github_branch: release/v8
7 github_path: docs/lib/content/using-npm/removal.md
8 redirect_from:
9 - /cli-documentation/v8/misc/removal
10 - /cli-documentation/v8/misc/removing-npm
11 - /cli-documentation/v8/using-npm/removal
12 - /cli-documentation/v8/using-npm/removing-npm
13 - /cli/v8/misc/removal
14 - /cli/v8/misc/removing-npm
15 - /cli/v8/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, get the npm source code, and do:
27
28 ```bash
29 sudo make uninstall
30 ```
31
32 ### More Severe Uninstalling
33
34 Usually, the above instructions are sufficient. That will remove npm, but leave behind anything you've installed.
35
36 If that doesn't work, or if you require more drastic measures, continue reading.
37
38 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 less a package's install script is particularly ill-behaved).
39
40 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.
41
42 To remove everything npm-related manually:
43
44 ```bash
45 rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
46 ```
47
48 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:
49
50 ```bash
51 ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
52 ```
53
54 Prior to version 0.3, npm used shim files for executables and node modules. To track those down, you can do the following:
55
56 ```bash
57 find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
58 ```
59
60 ### See also
61
62 - [npm uninstall](/cli/v8/commands/npm-uninstall)
63 - [npm prune](/cli/v8/commands/npm-prune)