How to uninstall Node.js on a Mac
Node.js is an open-source runtime environment used by developers to create networked programs and web servers. The way to install Node.js on a Mac is differently than the regular method for installing applications on the system. Therefore, when you need to uninstall Node.js, you might be confused. That’s why we’ve prepared a step-by-step guide explaining how to uninstall Node on a Mac.
- Where is Node installed on your Mac?
- How to check what version of Node you have
- How to uninstall Node.js from a Mac
- How to quickly uninstall apps from a Mac
The quickest way to uninstall any application on a Mac
If you want to uninstall applications completely (including all their support files) from your Mac, it is not enough to just drag and drop their icons into the Trash bin. That would leave the support files still on your disk.
You can find those leftover files manually; however, you can also use a special utility called App Cleaner & Uninstaller from Nektony, which automatically finds all the service files each application has left on your Mac and helps you uninstall the programs completely without leaving a single file behind. You can try the application for free.
App Cleaner & Uninstaller
Where is Node installed on your Mac?
To uncover where Node.js is installed on a Mac, first, you should try to remember how you installed it. Depending on that, Node’s files can be stored in different locations on your Mac.
If you downloaded the installer file from the Nodejs.org official website, you should look for the software support files in the following locations:
- /usr/local/bin
- /usr/local/lib
- /usr/local/include
- /usr/local/lib/dtrace
- /usr/local/share/doc
- /usr/local/share/man/man1
- /usr/local/systemtap/tapset
If you used NVM to install Node, you could find its support files in the .nvm hidden folder within your Home folder.
How to check what version of Node you have
You will need the Terminal command line to check the version of Node you have on your Mac. Follow these steps:
- Open the Terminal from Launchpad or the Applications folder.
- Copy and paste the following commands into the Terminal window:
- node -v
- npm -v
- You will then see which Node version is installed on your system.
How to uninstall Node.js from a Mac
The steps to remove Node.js from your Mac again depend on how you installed it. You can also delete Node.js on Mac using the Terminal command line or manually find and remove its files from your computer.
Here’s how to uninstall Node on Mac that was installed using Homebrew
- Open Terminal from Launchpad or the Applications folder.
- Run the following command in Terminal:
brew uninstall –force node
How to uninstall Node installed using NVM
- Launch Terminal.
- Type the following command and press Enter (Return).
Note: You need to type the Node version number used on your Mac. Above, you can find the guide on how to check the version.
Uninstalling Node.js from your Mac manually
For this method, you will need to manually find and remove all files associated with Node. Here is how:
- Open Finder.
- Press the Cmd+Shift+G shortcut.
- In the search field, type /usr/local/lib and press Enter.
- Finder will show this location. Find the files or folder with Node in their names and move them into the Trash.
- Go also to the locations listed below and remove all node and node_modules from there:
- /usr/local/include/node
- /usr/local/include/node_modules
- /usr/local/lib/node
- /usr/local/lib/node_modules
- /usr/local/bin/node
- /usr/local/bin/node_modules
- /usr/local/bin/node-gyp
- /usr/local/share/man/man1/npm
- /usr/local/lib/dtrace/node.d
- /opt/local/bin/ node
- /opt/local/include/node
- /opt/local/lib/node_modules
- /usr/local/share/doc/node
- /usr/local/share/systemtap/tapset/node.stp
- .npmrc
- .npm
- .node-gyp
- .node_repl_history
Note that Node may have more or less support files depending on the software version you have.
Once you remove all of Node’s files, empty your Trash and restart your system. Node.js will be completely uninstalled from your Mac.
How to quickly uninstall apps from a Mac
Just like Node, every application creates support files to ensure its proper performance. To completely uninstall any application from Mac, you also have to remove all of its temporary files. By default, they should be stored in the Library folder. However, applications sometimes spread their files all over your disk.
That’s why we’re introducing App Cleaner & Uninstaller. It is software that helps you uninstall applications from your Mac completely and safely with a few clicks. Here’s how to uninstall Node using App Cleaner & Uninstaller:
- Download and launch App Cleaner & Uninstaller.
- Select the programs you want to remove.
- Click the Uninstall button and confirm the action.
App Cleaner & Uninstaller will remove the program entirely, including all of its support files. If you wish to see these service files before removing the app, switch to Expert mode.
Additionally, App Cleaner & Uninstaller finds the leftovers of previously removed apps. To do this, switch to the Remaining Files section, where you will find support files of already uninstalled apps.
We recommend checking your system for unused software programs and useless service files left behind by removed apps so that you can free up space on your disk and optimize your Mac’s performance.
Conclusion
Uninstalling Node.js from a Mac involves a different process than the steps for removing sandboxed applications. This article provided two ways to do this. We also want to remind you that you can use App Cleaner & Uninstaller to wholly and quickly uninstall 1,500+ apps on macOS. You can download a free trial using the button below.
App Cleaner & Uninstaller Uninstall any Mac application in 2 minutes
Rukovodstvo
статьи и идеи для разработчиков программного обеспечения и веб-разработчиков.
Как удалить Node.js из Mac OSX
Если вы читали один из моих предыдущих постов о том, как установить Node.js [http://stackabuse.com/how-to-install-node-js-on-ubuntu/], вы, вероятно, заметили, что существует довольно много способов установите его на свой компьютер. Это может быть из диспетчера пакетов, из исходного кода или из предварительно скомпилированного двоичного дистрибутива. Итак, что вы делаете, когда хотите удалить Node.js? Здесь я опишу несколько способов удалить его с компьютера Mac OSX. Просто имейте в виду, что эти команды удаляют N
Время чтения: 3 мин.
Если вы читали один из моих предыдущих постов о том, как установить Node.js , вы, вероятно, заметили, что есть несколько способов установить его на свой компьютер. Это может быть из диспетчера пакетов, из исходного кода или из предварительно скомпилированного двоичного дистрибутива. Итак, что вы делаете, когда хотите удалить Node.js?
Здесь я опишу несколько способов удалить его с компьютера Mac OSX. Просто имейте в виду, что эти команды удаляют исполняемый файл Node, а не обязательно все проекты Node или кеш NPM.
Вручную
Если вы установили Node из исходного кода или из двоичного дистрибутива, вам, вероятно, придется удалить исполняемый файл и другие ресурсы вручную. К сожалению, это непросто, поскольку существует довольно много каталогов, содержащих ресурсы Node, например npm и node_modules .
Чтобы полностью удалить исполняемый файл node npm , вот несколько инструкций о том, что делать:
Обратите внимание, что не все каталоги, перечисленные здесь, могут существовать в вашей системе в зависимости от вашего метода установки.
- Удалите node и / или node_modules из /usr/local/lib
- Удалите node и / или node_modules из /usr/local/include
- Удалите node , node-debug и node-gyp из /usr/local/bin
- Удалите .npmrc из вашего домашнего каталога (это ваши настройки npm, не удаляйте их, если вы планируете сразу же переустановить Node)
- Удалите .npm из вашего домашнего каталога
- Удалите .node-gyp из вашего домашнего каталога
- Удалите .node_repl_history из вашего домашнего каталога
- Удалите node* из /usr/local/share/man/man1/
- Удалите npm* из /usr/local/share/man/man1/
- Удалите node.d из /usr/local/lib/dtrace/
- Удалить node из /opt/local/bin/
- Удалить node из /opt/local/include/
- Удалите node_modules из /opt/local/lib/
- Удалить node из /usr/local/share/doc/
- Удалите node.stp из /usr/local/share/systemtap/tapset/
Этот список должен включать почти все ссылки на Node в вашей системе. Имейте в виду, что их может быть больше. Пожалуйста, дайте мне знать, если вы найдете другие (и как вы изначально установили Node)!
Домашнее пиво
Метод Homebrew, возможно, является одним из самых простых способов включить и выключить Node в вашей системе. Команда для ее удаления так же проста, как и команда для ее установки. Предполагая, что вы использовали brew install node для его установки, просто выполните это, чтобы избавиться от него:
$ brew uninstall node
Вот и все! Все следы исполняемого файла исчезнут из вашей системы.
NVM
Диспетчер версий узлов (NVM) почти так же удобен, как Homebrew, но по-другому. Он позволяет вам установить несколько версий Node в вашей системе, чтобы вы могли легко переключаться с одной на другую.
В конце концов, вы, вероятно, захотите избавиться от одной из версий, когда закончите с ней. И, как и в случае с Homebrew, вы можете легко сделать это с помощью команды, аналогичной тому, как вы его установили:
$ nvm uninstall
И полный пример этого может быть примерно таким:
$ nvm uninstall v0.12.2
И теперь будет удалена только версия Node v0.12.2 . Имейте в виду, что если у вас было установлено несколько версий, то Node все равно будет в вашей системе, но не v0.12.2 (используя приведенный выше пример).
Фантомные установки
Если по какой-то причине ни один из вышеперечисленных методов у вас не сработал, вы всегда можете найти исполняемый файл с помощью инструмента командной строки, which . Эта команда показывает вам расположение файла для данной команды.
Мы можем использовать это, чтобы узнать, где в вашей системе установлен Node. Вы можете попробовать это с помощью:
$ which node /Users/scott/.nvm/versions/node/v4.1.2/bin/node
Вы можете видеть в выходных данных, что моя node связана с версией NVM, хотя ваша может находиться где-то еще. Теперь я могу использовать эту информацию, чтобы удалить его.
Использование этого инструмента должно помочь вам узнать, как был установлен исполняемый файл или как удалить его вручную.
Licensed under CC BY-NC-SA 4.0
Как установить и удалить NPM и Node.js на Mac с помощью Homebrew? –
Node.js — это мощная среда выполнения JavaScript, которая позволяет запускать JavaScript на стороне сервера, что делает ее идеальной для создания веб-приложений. С другой стороны, NPM (Node Package Manager) — это менеджер пакетов, который упрощает процесс установки и управления модулями и библиотеками Node.js. Если вы имеете дело с проектами, связанными с Node.js, вам необходимо настроить Node.js и NPM на вашем Mac и управлять ими. В этом уроке мы объясним процесс их установки и удаления на вашем Mac с помощью Homebrew.
Установка доморощенного
Домашнее пиво — это менеджер пакетов для macOS, который упрощает установку и управление программным обеспечением и инструментами разработки. Он позволяет легко устанавливать, обновлять и удалять пакеты программного обеспечения, что делает его бесценным инструментом для разработчиков. Убедитесь, что у вас есть доступ администратора, и выполните следующие действия, чтобы установить Homebrew на свой Mac.
- Откройте приложение «Терминал» на своем Mac, перейдя в папку «Приложения > Утилиты» или воспользуйтесь поиском Spotlight, нажав клавиши «Command + Пробел».

Откройте приложение Mac Terminal
- Чтобы установить Homebrew, вставьте следующую команду в командную строку и нажмите Enter. Эта команда инициирует процесс установки Homebrew:
/bin/bash -c “$(curl -fsSL
- Во время установки Homebrew предоставит подсказки и инструкции, а вам будет предложено ввести пароль администратора. Нажмите клавишу «Enter», когда будет предложено продолжить установку.

Установите Homebrew на Mac
- После завершения установки вам будет предложено выполнить две команды в качестве следующих шагов, чтобы добавить их в PATH вашей оболочки. Эти команды сделают Homebrew доступным с вашего терминала. Ниже приведен синтаксис этих команд (обязательно измените свое имя пользователя) или скопируйте их прямо из терминала.
(echo; echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”‘) >> /Users/ /.zprofile eval “$(/opt/homebrew/bin/brew shellenv)”

Установка Homebrew завершена
- Выполняйте эти команды одну за другой.

Доморощенный набор для пути
- Теперь, когда вы установили ПУТЬ Homebrew, настройка завершена. Вы можете проверить это, выполнив следующую команду в приложении «Терминал», и вы должны увидеть отображаемую версию Homebrew.

Проверьте версию Homebrew
- После установки Brew на ваш Mac обновите его, чтобы иметь самую последнюю информацию о пакете. Введите приведенную ниже команду в командную строку и нажмите Enter.

Обновление Доморощенного
Установка NPM и Node.JS
Откройте приложение «Терминал» и просто выполните следующую команду. После выполнения этой команды Homebrew загрузит и установит последние версии Node.js и NPM. Это может занять несколько минут.
узел установки Brew

Установите Node и NPM
Обратите внимание: если вы хотите установить определенную версию Node.js, например версию 14, вы можете добиться этого, выполнив следующую команду:
заварить установку узла @ 14
Теперь, чтобы убедиться, что Node.js и NPM были успешно установлены, и проверить их версии, используйте эти команды:
- node -v, чтобы проверить версию Node.js.
- npm -v, чтобы проверить версию NPM.

Проверка версии узла
Удаление NPM и Node.js
Если вам когда-нибудь понадобится удалить Node.js и NPM, вы можете сделать это с помощью команды удаления Homebrew. Просто введите приведенную ниже команду в терминале и нажмите Enter.
узел удаления Brew

Удалить узел
Чтобы убедиться, что Node.js и NPM полностью удалены из вашей системы, вы также можете запустить эти дополнительные команды, чтобы удалить все оставшиеся файлы конфигурации:
rm -rf /usr/local/lib/node_modules rm -rf /usr/local/include/node rm -rf /usr/local/include/node_modules

Удаление модулей и файлов Node
Чтобы убедиться, что Node.js и NPM были успешно удалены, еще раз запустите те же команды проверки версий. узел -v должен возвращать ошибку «модуль «Нет такого файла или каталога».

Ошибка версии узла
И npm -v покажет ошибки, которые модуль не найден.

Заключение
Вот и все. Теперь вы узнали, как установить NPM и Node.js на Mac с помощью Homebrew. Вы также можете выполнить описанные шаги, чтобы удалить их, если это необходимо. Эти инструменты необходимы для разработки JavaScript, и освоение их установки и удаления является важнейшим навыком для любого разработчика. Независимо от того, начинаете ли вы свой путь программирования или вам необходимо эффективно управлять средой разработки, теперь у вас есть знания и уверенность для работы с NPM и Node.js на вашем Mac.
Here’s how to uninstall Node on your Mac
Having spent some years coding applications for macOS, we’ve created a tool that everybody can use. The all-round problem fixer for Mac.
![]()
So here’s a tip for you: Download CleanMyMac to quickly solve some of the issues mentioned in this article. But to help you do it all by yourself, we’ve gathered our best ideas and solutions below.
Features described in this article refer to the MacPaw site version of CleanMyMac X.
If you’ve installed Node.js on your Mac to learn how it works and experiment using it on a server you run but no longer want it, you should uninstall it. Uninstalling software you don’t use is good practice, as it frees up space and reduces the possibility of its files causing conflicts with other software on your Mac. In this article, I’ll show you how to uninstall Node.js.
What is Node.js?
First, let’s take a closer look at what Node.js is and what it does, just in case you found it lurking on your Mac and do not recall installing it in the first place.

Node.js is a server-side JavaScript runtime environment that executes JavaScript instructions on a server and delivers the results to the web browser client. It runs on macOS, Windows, Linux, and other platforms. Some well-known organizations, such as Netflix, Microsoft, LinkedIn, and Amazon AWS, use it to deliver their online services. It’s built on Google’s Chrome V8 JavaScript engine but is open source and can be downloaded by anyone.
How to uninstall Node.js on your Mac
There are several ways to uninstall Node from your Mac. The best one for you to use depends on how you installed it in the first place. Choose the options that best fit your situation below.
How to uninstall Node.js manually
This one is the most challenging way to uninstall Node, as you will have to track down lots of different files and remove them manually one by one.

- Click on the Finder icon in the Dock, choose the Go menu, and then Go to Folder.
- Paste the following directory path in the text box: /usr/local/lib
- Look for files with the name ‘node’ and move them to the Trash.
- Repeat these three steps for the following directories, pasting each path into the text box in Go to Folder and dragging the files with ‘node’ to the Trash.
- Go to your Home folder and drag the files below to the Trash: .npm; .node-gyp; .nodereplhistory.
- Empty the Trash.
How to uninstall Node.js if you installed it using Homebrew
If you installed Node using Homebrew, go to Applications > Utilities and open Terminal, then type the following command:
brew uninstall —force node
That will uninstall Node and all of its components.
How to uninstall Node.js if you installed it with Node Version Manager (NVM)
If you used NVM to install Node, open Terminal and type the following command:
Replace with the version number of Node.js you installed. So, for example, if you installed v17.0, you would type:
nvm uninstall v17.0
How to uninstall any app easily
As you can see, there are a lot of steps involved in completely uninstalling Node.js. The same is true for most applications. If you want to uninstall them manually and thoroughly, you will need to hunt down every file and drag it to the Trash.
However, there is a more effortless way, thanks to a handy application called CleanMyMac X. Among many other valuable tools, CleanMyMac X has an Uninstaller module that takes all the work out of uninstalling apps. You can download it for free here.
Once you’ve downloaded it, follow the steps below to uninstall an application.

- Open CleanMyMac X and choose Uninstaller.
- Locate the application you want to uninstall (tip: you can filter applications by clicking the name of the developer in the middle pane or find them through the search bar).
- Check the button next to the application’s name.
- Click Uninstall.
How to remove application leftovers
Remember we mentioned earlier that if you have moved an application binary to the Trash, you still need to remove leftovers? Well, you can do that using CleanMyMac X, too.

- Choose the Uninstaller module.
- In the middle pane, select Leftovers (the number next to it tells you how many leftover files CleanMyMac X has found).
- Check the button next to the leftovers you want to remove in the right pane.
- Click Uninstall.
Once the removal is complete, you can rest assured that all app traces are gone from your Mac for good. The app frees up precious space and eliminates the possibility of those files causing a problem in the future.
Node.js is a server-side JavaScript runtime environment that you may have installed on your Mac. If you no longer need it or use it, you should uninstall it to free up space and prevent it from conflicting with other software on your Mac. Follow the steps above to uninstall Node.js and use CleanMyMac X to remove any leftover files from Node or any other application.
