ipfs/kubo · error
removed, use 'ipfs routing' instead
Error message
removed, use 'ipfs routing' instead
What it means
The `ipfs dht` command tree was removed and folded into `ipfs routing`; invoking a removed command returns this hard error from its Run function. It is a deliberate migration error, not a runtime failure. The helptext points users at the replacement.
Source
Thrown at core/commands/dht.go:130
pfm := pfuncMap{
routing.FinalPeer: func(obj *routing.QueryEvent, out io.Writer, verbose bool) error {
fmt.Fprintf(out, "%s\n", obj.ID)
return nil
},
}
verbose, _ := req.Options[dhtVerboseOptionName].(bool)
return printEvent(out, w, verbose, pfm)
}),
},
Type: routing.QueryEvent{},
}
var RemovedDHTCmd = &cmds.Command{
Status: cmds.Removed,
Helptext: cmds.HelpText{
Tagline: "Removed, use 'ipfs routing' instead.",
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
return errors.New("removed, use 'ipfs routing' instead")
},
}
View on GitHub (pinned to 329838acdf)
Solutions
- Replace `ipfs dht <sub>` with `ipfs routing <sub>` in scripts
- Update tooling/docs to the current kubo CLI
- Pin an older kubo version temporarily if migration must be deferred
Example fix
// before ipfs dht findpeer <peerID> // after ipfs routing findpeer <peerID>
Defensive patterns
Strategy: validation
Validate before calling
if strings.HasPrefix(cmd, "ipfs dht ") { cmd = strings.Replace(cmd, "ipfs dht ", "ipfs routing ", 1) } Try / catch
if strings.Contains(err.Error(), "removed, use 'ipfs routing'") { retryWithRoutingCommand() } Prevention
- Migrate scripts from `ipfs dht` to `ipfs routing` once, permanently
- Pin kubo versions in CI and test CLI invocations on upgrades
When it happens
Trigger: Invoking any subcommand under the removed `ipfs dht` tree (RemovedDHTCmd) in a kubo version where those commands were removed.
Common situations: Outdated scripts, documentation, or tutorials written before the dht->routing rename; CI pipelines pinning old command names.
Related errors
- ErrNotDHT
- unknown data field encoding
- supernode routing was never fully implemented and has been r
- unrecognized routing option: %s
- invalid configuration profile: %s
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/0c44670370717a0d.
Report an issue: GitHub.