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 WslCliInstaller.remove() when status.state is 'conflict' — a non-Orca command exists at the target path inside the WSL distro. Orca refuses to delete a command it didn't create. Note: the WSL remove() does not have a 'stale' guard like the host installer; only conflict and not_installed are handled.
Source
Thrown at src/main/cli/wsl-cli-installer.ts:292
async remove(): Promise<CliInstallStatus> {
const status = await this.getStatus()
if (!status.supported || !status.commandPath) {
return status
}
const legacyCommandPath = `${getPosixDirname(status.commandPath)}/${LEGACY_WSL_COMMAND_NAME}`
if (status.state === 'not_installed') {
// Why: a managed legacy `orca` left behind would later be re-adopted by
// startup reconciliation as opt-in proof, silently undoing this removal.
await this.run(
this.distro as string,
['set -euo pipefail', buildManagedLegacyRemoveCommand(quoteShell(legacyCommandPath))].join(
'\n'
)
)
return status
}
if (status.state === 'conflict') {
throw new Error(`Refusing to remove non-Orca command at ${status.commandPath}.`)
}
await this.run(
this.distro as string,
buildSafeRemoveCommand(status.commandPath, legacyCommandPath)
)
return this.getStatus()
}
private async resolveReadyState(): Promise<
| { status: CliInstallStatus }
| {
distro: string
commandPath: string
bridgePath: string
launcherPath: string
pathConfigured: boolean
}View on GitHub (pinned to 1136503c6a)
Solutions
- Inspect the file inside WSL: 'wsl -d <distro> -- ls -la <commandPath>'.
- If it's not needed, manually remove it inside WSL: 'wsl -d <distro> -- rm <commandPath>'.
- If it's a different tool you need, no action needed — Orca correctly refused.
Defensive patterns
Strategy: validation
Validate before calling
const status = await wslInstaller.getStatus()
if (status.state === 'conflict') {
showInfo('The WSL command is not owned by Orca and will not be removed.')
return
} Try / catch
try {
await wslInstaller.remove()
} catch (error) {
if (error instanceof Error && error.message.includes('Refusing to remove non-Orca command')) {
// Safe no-op; foreign command are never removed
} else { throw error }
} Prevention
- Check status.state before calling remove() on WSL CLI.
- Note the WSL remove() has no 'stale' guard — only conflict and not_installed.
When it happens
Trigger: Calling remove() on WSL CLI when the status probe finds a non-Orca-managed command at commandPath. buildSafeRemoveCommand would refuse to remove an unowned file.
Common situations: Same as install conflict: another tool named 'orca' in WSL. A previous Orca WSL install was partially cleaned up. Manual file replacement in the WSL bin directory.
Related errors
- Refusing to remove non-Orca command at ${status.commandPath}
- Refusing to replace 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
- ${status.detail ?? 'WSL CLI registration is unavailable.'}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/5fee7112630fafd8.
Report an issue: GitHub.