gk insights uninstall
Remove the Insights telemetry configuration written by setup
Synopsis
Remove what “gk insights setup” wrote for every supported AI tool, whether or not the tool is still installed:
Claude Code the OTEL keys in the “env” object of settings.json Codex the environment and exporter keys of [otel] in config.toml Copilot the shell env file and the profile lines that source it (the user environment variables on Windows), and the VS Code “github.copilot.chat.otel.enabled” setting OpenCode the plugin entry in the OpenCode config and the plugin files
A configuration counts as gk’s when it has the shape setup writes, whatever token or email it carries: for Claude Code, Codex and Copilot on Windows, an OTLP logs exporter sending a Basic Authorization header to a gk host (the stored endpoint’s, the default’s or any *.gitkraken.com); for Copilot on macOS and Linux, gk’s env file and the profile lines marked by gk; for OpenCode, plugin entries under gk’s own directory. Anything else, including managed settings, is left alone. Once every tool is cleaned up the stored Insights token is cleared; the email and endpoint are kept. If a tool could not be fully cleaned up the command exits with an error and keeps the token; running it again finishes the job once any file named in an error is fixed. Running it again after a clean uninstall changes nothing.
gk insights uninstall [flags]
Examples
gk insights uninstall
gk insights uninstall --dry-run
gk insights uninstall --json
Options
--dry-run Show what would be removed without changing anything
-h, --help help for uninstall
Options inherited from parent commands
--json Emit machine-readable JSON on stdout (GK_OUTPUT=json sets it session-wide)
--no-telemetry Disable telemetry (OTel spans, Sentry) for this invocation
--session string (Optional) Isolate auth and cache under a named session
SEE ALSO
- gk insights - Send AI coding tool telemetry to GitKraken Insights