I\'ve been playing around with node a couple of months ago, as it\'s a fast evolving project, I thought I\'d need to update it when I picked it up recently, not knowing how
To remove all cached versions except the current version
sudo n prune
Check how much all those versions are taking with du -sh /usr/local/n/versions.
Also,
Remove the installed node and npm (does not affect the cached version). This can be useful to revert to the system version of node (if in a different location), or if you no longer wish to use node and npm, or are switching to a different way of managing them.
sudo n uninstall