ipfs/kubo · error
expecting one argument: name
Error message
expecting one argument: name
What it means
The `ipfs pin remote rm` command requires exactly one positional argument: the remote service name whose configuration entry should be removed. If the user supplies zero arguments or more than one, the command returns this usage error before touching the config.
Source
Thrown at core/commands/pin/remotepin.go:550
},
Arguments: []cmds.Argument{
cmds.StringArg(pinServiceNameOptionName, true, false, "Name of remote pinning service to remove."),
},
Options: []cmds.Option{},
Type: nil,
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
cfgRoot, err := cmdenv.GetConfigRoot(env)
if err != nil {
return err
}
repo, err := fsrepo.Open(cfgRoot)
if err != nil {
return err
}
defer repo.Close()
if len(req.Arguments) != 1 {
return fmt.Errorf("expecting one argument: name")
}
name := req.Arguments[0]
cfg, err := repo.Config()
if err != nil {
return err
}
if cfg.Pinning.RemoteServices != nil {
delete(cfg.Pinning.RemoteServices, name)
}
return repo.SetConfig(cfg)
},
}
var lsRemotePinServiceCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "List remote pinning services.",
ShortDescription: "List remote pinning services.",View on GitHub (pinned to 329838acdf)
Solutions
- Run the command with exactly one argument: `ipfs pin remote rm <service-name>` (e.g. `ipfs pin remote rm web3.storage`).
- Check `ipfs pin remote ls` first to confirm the exact service name spelling.
- In scripts, quote the name and verify it is non-empty before invoking: `ipfs pin remote rm "$SERVICE"`.
- Run `ipfs pin remote rm --help` to see the exact expected argument syntax for your kubo version.
Example fix
// before ipfs pin remote rm // after ipfs pin remote rm web3.storage
Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash if [ "$#" -ne 1 ] || [ -z "$1" ]; then echo "usage: ipfs pin remote rm <service-name>" >&2 exit 2 fi ipfs pin remote rm "$1"
Prevention
- Always quote the service name argument in scripts
- Verify argument counts before invoking the CLI from automation
- Check `ipfs pin remote rm --help` when upgrading kubo versions
When it happens
Trigger: Calling `ipfs pin remote rm` with no arguments, or passing extra positional arguments (e.g. `ipfs pin remote rm web3.storage extra`). The check is `len(req.Arguments) != 1` after the repo is opened.
Common situations: Copy-pasting a command and dropping the name argument; quoting mistakes in shell scripts leaving an empty argument that the CLI strips out; old scripts written for a different CLI syntax that accepted additional arguments.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- a service name must be passed
- no bootstrap peers to add
- cannot specify negative offset
- cannot specify negative length
- service already present
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/62150c17d576c350.
Report an issue: GitHub.