Cleanup and uninstall
Removing the npm package is the last step, not the first. Doing it first orphans a boot service and leaves keys in authorized_keys with nothing left to remove them.
Revoking access only
Most of the time you do not want to uninstall anything, you want a device or a code to stop working.
| Goal | Command |
|---|---|
| I printed a code and did not use it | onepilot pair --clean |
| A phone was lost, or someone left | onepilot pair --clean-devices |
| Stop reporting host health | onepilot monitor forget |
| Stop keeping this machine awake | onepilot keepawake off |
Full uninstall
Four steps, in this order.
1. Remove the keys
onepilot pair --clean-devices
onepilot pair --cleanDo this while the CLI is still installed. These entries live in your ~/.ssh/authorized_keys, and once the binary is gone you are editing that file by hand.
2. Stop the tunnel service
Only if the host was ever reachable from outside its network.
| Platform | Command |
|---|---|
| macOS, per user | launchctl bootout gui/$(id -u)/com.onepilot.relay |
| macOS, all boots | sudo launchctl bootout system/com.onepilot.relay.system |
| Linux, per user | systemctl --user disable --now onepilot-relay.service |
| Linux, system | sudo systemctl disable --now onepilot-relay.service |
| Windows | Kill the onepilot relay process; there is no service to remove. |
The unit files themselves sit at ~/.config/systemd/user/onepilot-relay.service on Linux and ~/Library/LaunchAgents/com.onepilot.relay.plist on macOS, with system wide variants under /etc/systemd/system/ and /Library/LaunchDaemons/. Delete them once the service is stopped.
3. Stop the daemon
pkill -f 'onepilot[^ ]* s[e]rve'This ends any persistent sessions still running on the host.
4. Remove the package
npm uninstall -g onepilotThe state directory
Everything else lives in ~/.onepilot/: logs, the monitor configuration, the keep awake setting, cached update checks, and the host identity.
If you are genuinely finished with the machine:
rm -rf ~/.onepilotTo detach a host from your account without destroying its identity, use onepilot logout instead. It stops the tunnel and leaves everything else intact, so pairing it again later restores the same server rather than creating a second one.
Things outside the state directory
Three files elsewhere may still hold something, depending on which features you used:
~/.ssh/authorized_keys, if you skipped step 1. Onepilot entries are labelled, so they are easy to spot and remove by hand.~/.git-credentials, if you ranonepilot github set-token.~/.claude/settings.json, if you enabled Claude Code approvals. Onepilot adds one hook entry there and leaves the rest of the file alone.
Removing a server from the app
Deleting a server in the app stops it from reporting and drops it from your account, but it cannot reach into the host to remove keys or services. If you are decommissioning a machine, run the steps above on the host first, then delete it in the app. If the host is already gone, deleting it in the app is enough.
Still stuck? The debugging guide covers what to check before tearing anything down.