Upgrade and uninstall
Move a host to a new sensor version, change its enrollment token, or remove the Octic sensor completely.
The installer you used to install the sensor also upgrades it, and on Linux and Windows it removes it too. This page shows each task on Linux, Windows and macOS. The Version column on Sensors shows which version each host runs.
Run the install command again. The latest URL always installs the current
stable release. On Linux and Windows, a host that is already enrolled keeps
its token and configuration, and the installer doesn't ask for a token
again, so upgrades can run unattended. macOS works differently; see
Upgrade on macOS.
curl -fsSL https://get.octic.ai/sensor-linux/latest/install.sh | sh- Linux: the installer replaces
/usr/bin/octic-sensor, rewrites the systemd unit if it changed, and restarts the service on the new version. - Windows: the installer stops the service, swaps in the new version and starts it again. If the update fails, it restores the previous version and its running state. Running the same version again changes nothing.
To move to a specific version instead, replace latest with the version
number, such as 1.0.0.
After an upgrade, developers start a new Codex session, or restart the Codex desktop app, to load the updated Codex settings.
The macOS installer needs the sensor stopped, and a token, every time it runs:
- Stop the sensor:
Mac, Terminalbash sudo /usr/local/libexec/octic-sensor stop - Copy the install command from the Enroll Host dialog, with the host's enrollment token, and run it in Terminal as your own user.
- If the host had start at boot
on, turn it on again:
Mac, Terminalbash sudo /usr/local/libexec/octic-sensor install --enable - Start the sensor:
Mac, Terminalbash sudo /usr/local/libexec/octic-sensor start
The installer replaces /usr/local/libexec/octic-sensor and the token, and
puts back the default launch daemon profile. If the install fails, it
restores the previous executable and token. If you gave the sensor Full Disk
Access, grant it again for the new executable.
The macOS installer won't replace a config.yaml you edited: it stops with
Existing configuration differs or is not readable and regular before it
changes anything. Move the file aside for the upgrade. With the sensor
stopped:
sudo mv "/Library/Application Support/OcticSensor/config.yaml" "/Library/Application Support/OcticSensor/config.yaml.keep"Run the install command, then put your file back before you start the sensor:
sudo mv "/Library/Application Support/OcticSensor/config.yaml.keep" "/Library/Application Support/OcticSensor/config.yaml"sudo /usr/local/libexec/octic-sensor startcurl -fsSL https://get.octic.ai/sensor-linux/latest/install.sh | \ OCTIC_ENROLLMENT_TOKEN=<new-enrollment-token> \ shReplace <new-enrollment-token> with a token from Settings, under
Enrollment tokens.
- Linux: a token you pass replaces the one on disk. The installer checks the new token with Octic before it restarts the service.
- Windows: an installed host ignores a new token, with a warning. Remove the sensor first, as above, then install it with the new token. A plain uninstall keeps queued events, so nothing collected is lost.
- macOS: the new token replaces the one on disk. The installer doesn't
check it with Octic, so run
sudo /usr/local/libexec/octic-sensor status --probeafter you start the sensor. If the host had start at boot on, runsudo /usr/local/libexec/octic-sensor install --enablebeforestart.
See Rotate a token to replace a token across a fleet.
curl -fsSL https://get.octic.ai/sensor-linux/latest/install.sh | sh -s -- --uninstallUninstalling stops the service and removes the sensor. Most importantly, it withdraws the Claude Code settings file and the sensor's Codex entries. Those settings make every Claude Code and Codex session on the host run the sensor; left behind without it, they would break those tools for everyone on the host.
To also delete everything the sensor kept, add --purge on Linux and macOS,
or use -Purge instead of -Uninstall on Windows:
curl -fsSL https://get.octic.ai/sensor-linux/latest/install.sh | sh -s -- --uninstall --purge| What | Uninstall on Linux | Uninstall on Windows | Uninstall on macOS | Purge |
|---|---|---|---|---|
| Service, sensor executable | Removed | Removed | Removed | Removed |
| Claude Code settings file and Codex entries | Removed | Removed | Removed | Removed |
| Enrollment token | Kept | Removed | Kept | Removed |
| Configuration file | Kept | Kept | Kept | Removed |
| Queued Claude Code and Codex events | Kept | Kept | Kept | Removed |
On macOS, a plain uninstall also keeps the log, /Library/Logs/octic-sensor.log;
purge deletes it. If octic-sensor uninstall reports an error, keep the
executable: fix the problem it names, then run uninstall again before you
delete the file.
The host stays on Sensors and turns Offline 15 minutes after its last heartbeat. To stop any host reporting with a token, revoke the token; see Enrollment tokens.
The Windows uninstall deletes the enrollment token, so a reinstall needs one. Install as usual; the reinstalled sensor keeps the settings in the retained configuration file.
If you removed the service with octic-sensor.exe uninstall instead of the
script, the installation folder is still there, and the installer says to
re-run with -Reenroll. That enrolls the retained files with a token:
$env:OCTIC_ENROLLMENT_TOKEN = '<enrollment-token>'& ([scriptblock]::Create((irm https://get.octic.ai/sensor-windows/latest/install.ps1))) -ReenrollLast updated
Was this page helpful?