stablyai/orca · warning · Error
Refusing to remove a command not owned by Orca at ${status.c
Error message
Refusing to remove a command not owned by Orca at ${status.commandPath}. What it means
Thrown by CliInstaller.remove() when status.state is 'stale'. A stale command is one that exists at the path but is neither a clean Orca-managed command nor a clear foreign conflict — it may be a partially-installed or leftover Orca command that no longer passes ownership verification.
Source
Thrown at src/main/cli/cli-installer.ts:232
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()
}
private resolveInstallSpec(): InstallSpec | null {
const commandPath = this.resolveCommandPath()
if (!commandPath) {View on GitHub (pinned to 1136503c6a)
Solutions
- Inspect the file at status.commandPath: 'ls -la' and 'cat' it to check for Orca markers.
- If it's a broken symlink or leftover Orca wrapper, manually remove it and retry.
- Reinstall Orca CLI (install()) to reset the marker, then remove() cleanly.
Defensive patterns
Strategy: validation
Validate before calling
const status = await installer.getStatus()
if (status.state === 'stale') {
// Investigate before calling remove()
showStaleGuidance(status.commandPath)
return
} Try / catch
try {
await installer.remove()
} catch (error) {
if (error instanceof Error && error.message.includes('not owned by Orca')) {
// Attempt reinstall first to reset markers, then remove
} else { throw error }
} Prevention
- Use install() to reset markers on a stale command before remove().
- Avoid partial manual deletions of Orca CLI files.
When it happens
Trigger: Calling remove() when the status probe classifies the command as 'stale'. This happens when the file exists but its marker is missing or corrupted, or it's a broken symlink pointing to a deleted Orca binary.
Common situations: A previous Orca version was uninstalled but left a wrapper script. The Orca binary was moved/deleted but the symlink or wrapper remains. The managed marker was stripped by a system cleanup tool.
Related errors
- Refusing to remove non-Orca command at ${status.commandPath}
- 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
- ${status.detail ?? 'CLI registration is unavailable on this
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/fa8e47961e4e1c9a.
Report an issue: GitHub.