Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make uninstaller for Mac #7371

Closed
corysimmons opened this issue Jun 22, 2016 · 12 comments
Closed

Make uninstaller for Mac #7371

corysimmons opened this issue Jun 22, 2016 · 12 comments
Labels
feature request Issues that request new features to be added to Node.js. install Issues and PRs related to the installers. macos Issues and PRs related to the macOS platform / OSX.

Comments

@corysimmons
Copy link

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?

@mscdex mscdex added install Issues and PRs related to the installers. feature request Issues that request new features to be added to Node.js. macos Issues and PRs related to the macOS platform / OSX. labels Jun 22, 2016
@mscdex
Copy link
Contributor

mscdex commented Jun 22, 2016

/cc @nodejs/build

@bnoordhuis
Copy link
Member

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.

@eljefedelrodeodeljefe
Copy link
Contributor

There has been talk to do the installer with electron. #7371. This could be a good task for it, if PackageMaker lacks functionality.

@rvagg
Copy link
Member

rvagg commented Jun 27, 2016

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

@rvagg
Copy link
Member

rvagg commented Jun 27, 2016

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)).

@Trott
Copy link
Member

Trott commented Jul 8, 2017

Looks like some work on this (or at least @rvagg's shell script suggestion) is happening in #10091?

@Pacerier
Copy link

Pacerier commented Nov 2, 2017

These are what I removed for OSX 10.12.5 node-v6.11.5.pkg:

  • /usr/local/bin/node
  • /usr/local/bin/npm
  • /usr/local/include/node
  • /usr/local/share/man/man1/node.1
  • /usr/local/share/doc/node
  • /usr/local/share/systemtap/tapset/node.stp
  • /usr/local/lib/node_modules
  • /usr/local/lib/dtrace/node.d

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.

@refack
Copy link
Contributor

refack commented Nov 11, 2018

@refack refack closed this as completed Nov 11, 2018
@govertb
Copy link

govertb commented Jan 25, 2019

+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.

@devasci
Copy link
Contributor

devasci commented Apr 30, 2019

Hi all, is this task still open. I would like to work on this, if this is still pending please let me know.

@mihaisavezi
Copy link

pkgutil

How did you use pkgutil ?

@govertb
Copy link

govertb commented May 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. install Issues and PRs related to the installers. macos Issues and PRs related to the macOS platform / OSX.
Projects
None yet
Development

No branches or pull requests