launcher icon indicating copy to clipboard operation
launcher copied to clipboard

Document uninstall process

Open rocketnova opened this issue 6 years ago • 22 comments

I've built the packages using package-builder and installed the macOS package on a host machine.

What's the proper way to uninstall it? Is there an uninstaller? or a way to build an uninstaller? Thanks!

rocketnova avatar Jan 25 '18 22:01 rocketnova

You can use the document here to get a list of files installed by the pkg and remove them yourself.

https://wincent.com/wiki/Uninstalling_packages_(.pkg_files)_on_Mac_OS_X

That should take care of uninstallation. I'll keep this open until we can provide a script.

groob avatar Jan 25 '18 22:01 groob

@groob Thanks for the quick response. It'll be good to have a script that can be deployed for uninstalling.

rocketnova avatar Jan 25 '18 23:01 rocketnova

We wrote tools/packaging/clean_host.sh to help with package development but be warned that it assumes you ran package-builder make with --identifier=kolide instead of the default (which is launcher). We can help you adapt this to your chosen identifier though if you need, but it should be a good starting point.

marpaia avatar Jan 26 '18 00:01 marpaia

Great. Thanks @marpaia

rocketnova avatar Jan 26 '18 00:01 rocketnova

@marpaia I'm not sure kolide launcher installs osqueryi (maybe it used to and it doesn't anymore?), but running the script as is, it throws an error osqueryi: command not found. If your team is just using this script in a dev environment, then it doesn't matter, but thought I should point it out in case you are recommending this as the proper way to uninstall kolide launcher from production hosts.

rocketnova avatar Jan 27 '18 00:01 rocketnova

Definitely don't run that script as is with a normally packaged launcher. It's not meant as an official or production anything. I'm just sharing it for context.

marpaia avatar Jan 27 '18 00:01 marpaia

Ok thanks!

rocketnova avatar Jan 27 '18 00:01 rocketnova

Please re-open. Talked with @groob at querycon about this. Not high priority, but it would be great to get an official/production uninstaller. Thanks!

rocketnova avatar Jun 01 '18 22:06 rocketnova

I'm aware that @rocketnova asked about macOS. I'm posting for others looking for uninstall instructions for Linux.

I installed Launcher for Debian Linux (kolide-osquery-launcher.deb) via dpkg -i kolide-osquery-launcher.deb.

I was able to uninstall launcher by executing sudo dpkg --remove launcher then rebooting the system.

This will leave some config files around, you can execute sudo dpkg --purge launcher to delete them. dpkg won't delete directories which aren't empty, for example I was given the following warning:

dpkg: warning: while removing launcher, directory '/usr/local/kolide/bin' not empty so not removed
dpkg: warning: while removing launcher, directory '/var/kolide/dichiye.launcher.kolide.com-443' not empty so not removed

You can rm these manually and as far as I can tell that's a successful uninstall.

I'd like to see this issue reopened, an official uninstaller for all supported platforms should be provided by Kolide.

0xmachos avatar Jun 07 '18 10:06 0xmachos

I agree that we should have better official documentation on how to purge a launcher installation.

marpaia avatar Jun 07 '18 16:06 marpaia

@marpaia What form do you envisage the uninstaller taking?

I don't know Go but I'd be happy to write a bash script which automates the steps I mentioned in my original comment.

Also thank you for reopening the issue.

0xmachos avatar Jun 07 '18 16:06 0xmachos

@0xmachos I was thinking of adding a comprehensive guide to the Launcher Docs with copy-pastable commands.

We could create a tool to uninstall launcher, but I would prefer if it were written in Go and, ideally, easily go get-able from any platform that the launcher works on.

marpaia avatar Jun 07 '18 17:06 marpaia

I can make a start on the guide for Debian.

Would you want that added to launcher.md?

0xmachos avatar Jun 07 '18 18:06 0xmachos

Yeah, we can either add a section in docs/launcher.md or create a new file at docs/uninstalling.md and link to it in docs/README.md. I think either solution would be OK.

marpaia avatar Jun 07 '18 19:06 marpaia

@marpaia Could you have a look at https://github.com/0xmachos/launcher/commit/d9f5cd47c5713117813725cf236e868ff2062cd4 and let me know if that's the kind of format you're after? Do the instructions need to be more verbose?

0xmachos avatar Jun 09 '18 10:06 0xmachos

Yeah, that looks good to me, other than the caveat that the directories at the end that have to be deleted manually will be different based on how the package was built (ie: it could be /var/foo/foobar-com-443 or something). Might be worth explaining that for those that like to reads docs verbatim?

marpaia avatar Jun 09 '18 17:06 marpaia

@marpaia Is https://github.com/0xmachos/launcher/commit/7bb303bb2b63cc1178fa3e4c49585880d2832567 sufficient?

I'm unaware of how your build differences translate into different directories so someone else might be better equipped to write more specific documentation here.

0xmachos avatar Jun 09 '18 18:06 0xmachos

If you submit the above in a PR, I can add a paragraph to it with an explanation, no worries.

marpaia avatar Jun 09 '18 18:06 marpaia

@marpaia No problem. It's open as PR #294.

0xmachos avatar Jun 09 '18 19:06 0xmachos

Nice, thanks so much @0xmachos! I made some light edits and merged that in. Thanks for getting this doc started as we can now iteratively work on expanding it by adding more platforms and install methods over time.

marpaia avatar Jun 09 '18 19:06 marpaia

@marpaia I've attempted to add macOS uninstall instructions for the launcher in #333

0xmachos avatar Jul 26 '18 14:07 0xmachos

This issue can be closed, right? cf. https://github.com/kolide/launcher/blob/master/docs/uninstalling.md

Or we wait for an uninstaller :D

polak785 avatar Jan 25 '21 16:01 polak785

Those docs seem good enough. Paths vary based on what identifier it was packaged with, but this issue is super stale

directionless avatar Oct 12 '22 13:10 directionless