Dozens of popular StackOverflow questions and tutorials all over dating back years with a ton of tedious steps. It'd be nice if I didn't have to follow some rando tutorial telling me to delete random stuff (and most likely leaving bits of Node all over my computer).
Uninstallers are pretty standard, no? Is there some technical reason there isn't one?
/cc @nodejs/build
Not a OS X packager expert but I suspect it's because we use PackageMaker. AFAIK, it doesn't have a good uninstall story except for manual fiddling with pkgutil.
There has been talk to do the installer with electron. https://github.com/nodejs/node/issues/7371. This could be a good task for it, if PackageMaker lacks functionality.
Pretty sure there is _no_ good uninstaller story for OSX, at least I've never encountered one. The installer rewrite work that was started in #776, continued in #2571 and then further in #5656 originally had an uninstall option but it simply didn't make sense in the installer, even with all the fancy Packages stuff. AFAIK the .pkg format simply has no means to handle uninstalling natively. If anyone can point us to a good example of a .pkg that comes with some kind of _nice_ uninstall option (even if it's a separate thing that gets installed) then please let us know!
In my work @ #5656 I tidied up the uninstall script and it should work nicely, I did think we could perhaps install this somewhere to be run on the commandline when people ask for it, we'd just need to make it difficult to invoke by accident: https://github.com/rvagg/io.js/blob/fhemberger-refactor-mac-installer-rebase/tools/osx-pkg/scripts/uninstall.sh
We could also just provide some instructions on our README on how to run that uninstall script yourself, curl -sL https://raw.githubusercontent.com/nodejs/node/main/tools/osx-pkg/scripts/uninstall.sh | sudo bash - _(I just love dealing with security concern-trolls who continue to file issues at https://github.com/nodesource/distributions about our curl|bash instructions))_.
Looks like some work on this (or at least @rvagg's shell script suggestion) is happening in https://github.com/nodejs/node/pull/10091?
These are what I removed for OSX 10.12.5 node-v6.11.5.pkg:
if /usr/local/bin has no other files, delete it. Same for /usr/local/include, /usr/local/lib/dtrace, /usr/local/lib, /usr/local/share/man/man1, /usr/local/share/man, /usr/local/share/doc, /usr/local/share/systemtap/tapset, /usr/local/share/systemtap, /usr/local/share, /usr/local. Apparently /usr/local is created by node, not of Mac factory settings.
Put into https://github.com/nodejs/node/projects/13 backlog
+1 for an easy and safe way to undo a .pkg installation on macOS. Still had to resort to pkgutil and the preinstall and postinstall scripts to figure out what to remove.
Hi all, is this task still open. I would like to work on this, if this is still pending please let me know.
pkgutil
How did you use pkgutil ?
pkgutil
How did you use pkgutil ?
I'm not entirely sure anymore, but I probably used the --{expand, flatten, bom} flags to figure out what the installation package puts where - also through the setup scripts - and undoing that.