stablyai/orca · warning · Error
Refusing to remove non-Orca command at ${status.commandPath}
Error message
Refusing to remove non-Orca command at ${status.commandPath}. What it means
Thrown by CliInstaller.remove() when status.state is 'conflict'. Orca will not delete a command at the target path that it did not create, to prevent removing another application's binary.
Source
Thrown at src/main/cli/cli-installer.ts:229
return this.getStatus()
}
async remove(): Promise<CliInstallStatus> {
const status = await this.getStatus()
if (!status.supported || !status.commandPath || !status.launcherPath || !status.installMethod) {
return status
}
if (status.state === 'not_installed') {
await this.removeLegacyLinuxCommandIfManaged(status.launcherPath)
if (this.platform === 'win32') {
await this.removeWindowsPathEntry(dirname(status.commandPath))
return this.getStatus()
}
return status
}
if (status.state === 'conflict') {
throw new Error(`Refusing to remove non-Orca command at ${status.commandPath}.`)
}
if (status.state === 'stale') {
throw new Error(`Refusing to remove a command not owned by Orca at ${status.commandPath}.`)
}
if (status.installMethod === 'symlink') {
await this.removeSymlink(status.commandPath)
await this.removeLegacyLinuxCommandIfManaged(status.launcherPath)
} else if (this.isWindowsPackagedBundledCommand(status.commandPath, status.launcherPath)) {
await this.removeWindowsPathEntry(dirname(status.commandPath))
} else {
await unlink(status.commandPath)
await this.removeWindowsPathEntry(dirname(status.commandPath))
}
return this.getStatus()
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Verify the file at status.commandPath is not Orca's: check for the managed marker.
- If you want it gone, manually remove it: 'rm <status.commandPath>'.
- If it's a tool you want to keep, no action is needed — Orca correctly refused to touch it.
Defensive patterns
Strategy: validation
Validate before calling
const status = await installer.getStatus()
if (status.state === 'conflict') {
// Do not call remove(); it's not Orca's command
showInfo('The command at the target path is not owned by Orca and will not be removed.')
return
} Try / catch
try {
await installer.remove()
} catch (error) {
if (error instanceof Error && error.message.includes('Refusing to remove non-Orca command')) {
// Safe no-op; the command belongs to another tool
} else { throw error }
} Prevention
- Check status.state before calling remove().
- Document that Orca will never remove foreign commands — this is by design.
When it happens
Trigger: Calling remove() when a non-Orca command exists at commandPath. The status probe determined the existing file lacks Orca's managed marker, so it's classified as a conflict rather than an Orca-owned command.
Common situations: Same as install conflict: another tool named 'orca' exists at the target path. A user is trying to unregister Orca's CLI but a different tool is now at that location.
Related errors
- Refusing to remove non-Orca command at ${status.commandPath}
- Refusing to replace non-Orca command at ${status.commandPath
- Refusing to remove a command not owned by Orca at ${status.c
- Refusing to replace non-Orca command at ${status.commandPath
- invalid_argument
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/9110442d794d0fe6.
Report an issue: GitHub.