boot2docker / osx-installer

Docker installer for Mac OS X
Apache License 2.0
1.25k stars 258 forks source link

Uninstall script? #46

Closed pirog closed 9 years ago

pirog commented 10 years ago

Any thoughts to packaging in or providing an uninstall script?

pirog commented 10 years ago

Based on a crude overview these are some of the things that an uninstall could/would theoretically do

  1. boot2docker destroy
  2. Uninstall VirtualBox (VB dmg has a nice uninstall.tool)
  3. Remove Boot2Docker app
  4. Remove boot2docker/docker binaries
  5. Remve ~/.boot2docker

Does the pkg install things other places that i am missing here?

pirog commented 10 years ago

I just added a basic uninstaller to the kalastack-docker project which may be useful for this too. Let me know if you want me to submit a PR and where to put it and i will do so: https://github.com/kalamuna/kalastack-docker/commit/c9bbaf5a26bbf9c8fba3003a512a18b90b4fd61d

SvenDowideit commented 10 years ago

/usr/local/share/boot2docker/boot2docker.iso (well, get rid of the dir, i'm thinking of throwing more in there over time :))

Does this mean that OSX installers don't have a gui uninstaller? mmmm, i wonder if I should just write an uninstall apple-script GUI?

pirog commented 10 years ago

I don't think GUI uninstallers are very common in OSX. Generally you just trash the .app and call it a day. That said, more complicated apps a la vagrant and virtualbox ship ship with a uninstall.tool with their DMGs. The tool is usually just an executable bash script which is the example we are following for now on the kalastack-docker project.

Writing a simple apple script based uninstaller gui could certainly work as well :)

SvenDowideit commented 10 years ago

in that case, if you beat me to a PR (not hard these days) YAY ;)

pirog commented 10 years ago

I've got time to work on these things this week so i'll try to throw something up!

pirog commented 10 years ago

One thing to also consider here is usually an uninstall.tool script gets packaged into a dmg. It looks like our release here is a .pkg so we would have to rejig whatever we are doing for packaging to build a dmg that includes the uninstall.tool.

We could also just leave the script in the repo and note its usage in documentation.

SvenDowideit commented 10 years ago

I'd just toss it into /usr/local/bin/boot2docker-uninstall - the .pkg already contains multiple files :)

pirog commented 10 years ago

sounds good! haven't had time to do this yet but am still game.

Caf commented 10 years ago

I need to uninstall it from one of my Mac, can't wait to try it. ;)

psykzz commented 9 years ago

For future

boot2docker stop
boot2docker delete
sudo rm /usr/local/bin/boot2docker
rm -rf ~/.boot2docker
rm -rf /usr/local/share/boot2docker
SvenDowideit commented 9 years ago

and

sudo rm /usr/local/bin/docker
huangsam commented 9 years ago

To summarize:

#!/bin/bash

# Stop boot2docker processes
boot2docker stop
boot2docker delete

# Remove boot2docker executable
sudo rm /usr/local/bin/boot2docker

# Remove boot2docker ISO and socket files
rm -rf ~/.boot2docker
rm -rf /usr/local/share/boot2docker

# Remove Docker executable
sudo rm /usr/local/bin/docker

I recall you were interested in a pull request @SvenDowideit. Where would you like this artifact be placed? I'm wondering if it should be a curl-able script.

SvenDowideit commented 9 years ago

i'd put it into the osx installer...

therealmarv commented 9 years ago

Thanks @huangsam ! This bothered me so much (I really hate pkg without uninstallers) I've even written a blog post about this issue (before discovering it here). Hope this gets accepted soon!

karantir commented 9 years ago

And keys:

rm -rf ~/.ssh/id_boot2docker*
huangsam commented 9 years ago

@karantir that was already covered in uninstall.sh