I want to downgrade my version of node. However, I don't remember how I installed it. Apparently I didn't use Homebrew (an OS X package manager). In any case, how do I completely uninstall given that I don't know how I installed it?

  • "homebrew"? It would be nice if you didn't assume that we know what operating system you're running, since NodeJS runs on Windows, Mac, and GNU/Linux. That said, you can always type which node and then become root and delete the binary file; that's effectively the same as "uninstalling" it. Dec 11 '13 at 20:50
  • @allquixotic "Homebrew" is the name of a package management system for OS X. It would nonetheless be worthwhile for OP to add the "osx" tag to his question, or would be if I hadn't just saved him the trouble. Dec 11 '13 at 20:52

How you installed Node determines how straightforward the process of uninstallation will be. If you installed it from MacPorts, sudo port uninstall nodejs should do the trick; if you installed it from source or from a tarball, that makes things a bit trickier, as there is usually no "make uninstall" or similar command available.

On the other hand, it may not be necessary to uninstall the version of Node you already have in place; packages installed via a properly configured Homebrew will override system-level installations. Consider simply installing the version you want through Homebrew. Also, if the existing Node is installed at the system level, then downloading the tarball of the version you want to use, and installing it in the same fashion, will probably (not certainly) overwrite the currently installed version and leave you with a working install of the version you want.

  • I'm pretty sure I installed it via the downloadable installer at nodejs.org
    – jononomo
    Dec 11 '13 at 21:08
  • @JonCrowell Then doing the same, with the version you'd rather be running, should overwrite the installation you have right now -- it's not guaranteed to succeed, but I should think that's by far the most likely result. Dec 11 '13 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.