ipfs/kubo · error
unexpected argument %q
Error message
unexpected argument %q
What it means
Fired by `ipfs pin remote rm` when a positional argument is given to the command. The command accepts no positional arguments (Arguments: []cmds.Argument{}), so this generic guard rejects any extra argument before processing.
Source
Thrown at core/commands/pin/remotepin.go:423
},
Arguments: []cmds.Argument{},
Options: []cmds.Option{
pinServiceNameOption,
cmds.StringOption(pinNameOptionName, "Remove pins with names that contain provided value (case-sensitive, exact match)."),
cmds.DelimitedStringsOption(",", pinCIDsOptionName, "Remove pins for the specified CIDs."),
cmds.DelimitedStringsOption(",", pinStatusOptionName, "Remove pins with the specified statuses (queued,pinning,pinned,failed).").WithDefault([]string{"pinned"}),
cmds.BoolOption(pinForceOptionName, "Allow removal of multiple pins matching the query without additional confirmation.").WithDefault(false),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
c, err := getRemotePinServiceFromRequest(req, env)
if err != nil {
return err
}
rmIDs := []string{}
if len(req.Arguments) != 0 {
return fmt.Errorf("unexpected argument %q", req.Arguments[0])
}
psCh := make(chan pinclient.PinStatusGetter)
errCh := make(chan error, 1)
ctx, cancel := context.WithCancel(req.Context)
defer cancel()
go func() {
errCh <- lsRemote(ctx, req, c, psCh)
}()
for ps := range psCh {
rmIDs = append(rmIDs, ps.GetRequestId())
}
if err = <-errCh; err != nil {
return fmt.Errorf("error while listing remote pins: %v", err)
}
if len(rmIDs) > 1 && !req.Options[pinForceOptionName].(bool) {View on GitHub (pinned to 329838acdf)
Solutions
- Remove the positional argument and express the target as an option, e.g. 'ipfs pin remote rm --service s --requestid <id>'
- See 'ipfs pin remote rm --help' for the supported filter options
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/commands/pin/remotepin.go:423 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/5fd55b53917dbbff.
Report an issue: GitHub.