Uninstall Node.js on a Mac OS

In this tutorial, we will show you 3 methods to uninstall Node.js from Mac OS system.

How to Uninstall Node.js on a Mac?

Here are the 3 methods:

Method 1: Uninstall Node.js using Terminal

One of the easiest and quickest ways to uninstall Node.js from your Mac is by using the Terminal app, Here are the steps for that:

Step 1: Open the Terminal app on your Mac.

Step 2: Type the following command and press Enter to see the version of Node.js that is installed on your Mac:

node -v

Step 3: Type the following command to uninstall Node.js:

sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/man1/node.1}

Step 4: Press Enter and enter your password when prompted.

Step 5: Type the following command and press Enter to verify that Node.js has been uninstalled:

node -v

Method 2: Uninstall Node.js using Homebrew

If you installed Node.js on your Mac using Homebrew, you can uninstall it using Homebrew as well, Here are the steps for that:

Step 1: Open the Terminal app on your Mac.

Step 2: Type the following command to uninstall Node.js:

brew uninstall node

Step 3: Press Enter and wait for the uninstallation process to complete.

Step 4: Type the following command and press Enter to verify that Node.js has been uninstalled:

node -v

Method 3: Uninstall Node.js using Node Version Manager (NVM)

You can uninstall node js using NVM, Here are steps:

Step 1: Open the Terminal app on your Mac.

Step 2: Type the following command to list the installed versions of Node.js:

nvm ls

Step 3: Type the following command to uninstall a specific version of Node.js:

nvm uninstall <version>

Replace <version> with the version of Node.js that you want to uninstall.

Step 4: Repeat Step 3 for each version of Node.js that you want to uninstall.

Step 5: Type the following command to verify that Node.js has been uninstalled:

node -v

Conclusion

In conclusion, we have learned 3 methods to remove node js from mac os completely.

Recommended Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *