How does uninstall work anyhow? Verify and update the docs.
Prompted by a refresh of our docs, and a slack conversation (see following thread). I think we have some gaps.
For context, I think the way our world generally works is that the installers create some basic structure, and put the binaries on disk. Then, when launcher starts, it creates it's database and associated files in the root directory. Uninstall may or may not remove that local database. That uncertainty makes a subsequent re-install confusing.
Question 1: On an endpoint initiated uninstall, should the database and root directory be removed? Phrased differently, this is really a question about whether a subsequent re-install should get a new node key.
Question 2: Is this different for server initiated uninstalls than endpoint initiated installs?
Question 3: Which of the uninstall flows do that, and which don't? I suspect that:
- the dpkg ones remove the db -- this is what
--purgeusually does. Not sure about rpm - the mac one does, because that invokes our uninstall
- no idea about windows
Goals:
- Answer questions 1 and 2. What do we want anyhow?
- Fix uninstall processes. Can we bake something in that makes it work?
- Update docs here and here
Note that a common repair pattern is to install the new package -- so we can't just wipe it on initial install.
I suspect that if we want uninstalls to automated remove the database, even though the installer didn't create it, we might need to use some trickery. It's going to depend on what kinds of things we can easily do in wix.
@zackattack01 We had a customer just report the uninstall process on Windows does not clear some files (potentially including the launcher DB) which causes new launcher installs (from a different tenant) to not work correctly and report to the original tenant from their previous installation.
When we fix this, we should back out https://github.com/kolide/k2/pull/9197