| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | .TH "REMOVAL" "7" "August 2021" "" "".SH "NAME"\fBremoval\fR \- Cleaning the Slate.SS Synopsis.PSo sad to see you go\..P.RS 2.nfsudo npm uninstall npm \-g.fi.RE.POr, if that fails, get the npm source code, and do:.P.RS 2.nfsudo make uninstall.fi.RE.SS More Severe Uninstalling.PUsually, the above instructions are sufficient\.  That will removenpm, but leave behind anything you've installed\..PIf that doesn't work, or if you require more drastic measures,continue reading\..PNote that this is only necessary for globally\-installed packages\.  Localinstalls are completely contained within a project's \fBnode_modules\fPfolder\.  Delete that folder, and everything is gone less a package'sinstall script is particularly ill\-behaved)\..PThis assumes that you installed node and npm in the default place\.  Ifyou configured node with a different \fB\-\-prefix\fP, or installed npm with adifferent prefix setting, then adjust the paths accordingly, replacing\fB/usr/local\fP with your install prefix\..PTo remove everything npm\-related manually:.P.RS 2.nfrm \-rf /usr/local/{lib/node{,/\.npm,_modules},bin,share/man}/npm*.fi.RE.PIf you installed things \fIwith\fR npm, then your best bet is to uninstallthem with npm first, and then install them again once you have aproper install\.  This can help find any symlinks that are lyingaround:.P.RS 2.nfls \-laF /usr/local/{lib/node{,/\.npm},bin,share/man} | grep npm.fi.RE.PPrior to version 0\.3, npm used shim files for executables and nodemodules\.  To track those down, you can do the following:.P.RS 2.nffind /usr/local/{lib/node,bin} \-exec grep \-l npm \\{\\} \\; ;.fi.RE.P(This is also in the README file\.).SS See also.RS 0.IP \(bu 2npm help uninstall.IP \(bu 2npm help prune.RE
 |