How to Uninstall Node.js From Your Mac

Trending 2 weeks ago

Uninstalling Node connected your Mac is beautiful easy, but removing nan residual files requires other steps. We'll show you precisely what you request to do.

Person Coding connected a MacBook utilizing Visual Studio Code

Node.js is an open-source, cross-platform runtime situation that allows you to tally JavaScript codification extracurricular a browser. It is commonly utilized to build web servers, but it tin besides beryllium utilized for various different tasks, specified arsenic creating real-time applications and streaming data.

There are a fewer reasons why you mightiness want to uninstall Node.js from your Mac. For example, you whitethorn nary longer request it for a task you are moving on, aliases you're experiencing problems pinch it and mightiness want to reinstall it. Below, we will show you really to uninstall Node.js from your Mac.

How to Uninstall Node.js successful macOS

Uninstalling Node.js from your Mac tin beryllium done successful aggregate ways, depending connected really you installed it. The options beneath will dangle connected your situation, truthful take nan 1 that champion suits your existent installation.

Uninstall Node.js From Your Mac via Homebrew

Homebrew is simply a third-party package head that makes it easy to install package connected your Mac utilizing Terminal. If you had installed Node.js via Hombrew, you tin uninstall it by opening nan Terminal app using Spotlight search and typing successful nan pursuing command:

brew uninstall
macOS Terminal moving nan uninstall bid for node via Homebrew

This bid will uninstall Node.js from your Mac and region each residual files arsenic well.

Remove Node.js From Your Mac via Node Version Manager

Node Version Manager is simply a instrumentality that allows you to instal and negociate aggregate versions of Node.js connected your computer. This tin beryllium useful if you request to usage different versions of Node for different projects. You tin uninstall Node.js via Node Version Manager by pursuing these steps:

  1. Open nan Terminal app connected your Mac and tally nan pursuing bid to database each nan installed versions of Node.js: nvm list
  2. Find nan type of Node.js that you want to uninstall and return statement of its name.
    nvm database bid successful Terminal
  3. Run nan pursuing bid to uninstall nan circumstantial Node.js version: nvm uninstall version

For example, to uninstall Node type 20.6.0, you'd person to tally nan pursuing command:

nvm uninstall 20.6.0

This bid will region nan specified Node.js type and won't impact nan different installations if location are any.

Node.js successfully uninstalled from Mac utilizing nan nvm uninstall command

Delete nan Node.js Files Manually

If you're still facing issues pinch uninstalling Node.js, you tin manually delete nan files via Finder.

To do this, unfastened Finder and prime Go > Go to Folder from nan paper bar. Then, type successful /usr/local/lib and property nan Return key.

Go to Folder hunt from nan macOS paper bar

Now, look for immoderate files aliases folders pinch traces of Node.js successful this directory and move them to Trash. Similarly, spell done nan pursuing directories and delete immoderate akin files aliases folders

  • /usr/local/bin
  • /usr/local/include
  • /usr/local/share/man/man1
macOS lib files open

Next, caput complete to your personification directory by clicking Go > Home from nan paper barroom and delete nan pursuing files if they are present.

  • .npm
  • .node-gyp
  • .node_repl_history

Finally, quiet nan Trash folder, which will permanently region immoderate traces of Node.js from your Mac.

macOS Home Directory unfastened pinch respective folders and nan dock visible

Start Managing Your Node.js Installations

If you're a web developer looking for a powerful and reliable level to build your applications, Node.js is simply a awesome option. However, it is important to negociate your Node installations arsenic it will thief you debar problems specified arsenic conflicts betwixt different versions of Node.js and outdated dependencies.

Source Tutorials