Uninstall node js mac install#
I've tried uninstalling npm and reinstalling it following these instructions.Īll of this because I was trying to update an older version of node to install the "zipstream" library.
I've tried deleting the "node" directory in my /usr/local/include and the "node" and "node_modules" in my /usr/local/lib. I tried using BREW to update before NVM, using brew update and brew install node. So where is this phantom node 0.6.1-pre version and how can I get rid of it? I'm trying to install libraries via NPM so that I can work on a project. NVM says this (after I install a version of node for the first time in one bash terminal): nvm lsīut when I restart bash, this is what I see: nvm ls Remember to npm install on the projects you need to work on again.My version of node is always v0.6.1-pre even after I install brew node and NVM install v0.6.19.Make sure to be cautious as this process is irreversible!.Make sure to list all node_modules in a given directory BEFORE deleting them.%d in (node_modules) DO EXIST "%d" rm -rf "%d" Powershell Users: Get-ChildItem -Path "." -Include "node_modules" -Recurse -Directory | Remove-Item -Recurse -Forceįor me personally, this typically clears out about 40-60GB from my hard-drive, but your mileage may vary! In Conclusion name 'node_modules' - type d -prune - print - exec rm -rf '' \ Windows: $ cd documents $ FOR /d /r. WARNING: This process is irreversible! Mac / Linux: $ cd documents $ find. This script is actually very similar to the one above, but we're going to be utilizing rm -rf to completely delete them.
Uninstall node js mac full#
NOTE: Use caution here, and make sure that you are in a directory where you're comfortable removing all the instances of node_modules, run the script above to see a full list of them all before deleting. This list will give you a good idea of just the sheer amount of projects you have installed on your machine!ĭelete all node_modules found in a Directory: %d in (node_modules) DO EXIST "%d" echo %d "
name "node_modules" - type d -prune - print | xargs du -chs This command will print out each folder, and even show us how much space the folder is occupying ! $ cd documents $ find. NOTE: Make sure you cd into a specific directory where most of your projects are. List all node_modules found in a Directory:įirst, let's take a look at ALL the node_modules we have in a directory, before we actually start deleting them! 🤯 Free'd up 60GB personally /FSnMjpLctO- Mark Pieszak August 7, 2019 I recently tweeted about this, as it's something I use every few months and wanted to share with others who might have ran into the same situation themselves!įree up space on your HD by recursively deleting ALL /node_modules/ within a given directory.
Uninstall node js mac free#
Now take a look at your github/ folder, or wherever else you're storing the majority of your projects, and you can start to see where some of your free hard-drive space has gone! Whenever we work on a new project we need to run npm install, but how often do we think about the toll this takes on our hard-drive?Ī single node_modules folder can take up anywhere from 200+ megabytes of space (sometimes 1GB+ !).