tailscale/tailscale · error
cannot specify both --version and --track
Error message
cannot specify both --version and --track
What it means
The update command accepts either --version <x.y.z> (pin an exact version) or --track <stable|unstable|...> (follow a channel), never both; runUpdate returns this error when updateArgs.version and updateArgs.track are both non-empty before calling clientupdate.Update.
Source
Thrown at cmd/tailscale/cli/update.go:87
}
const gokrazyUpdateFromURLMagicArg = "--gokrazy-update-from-url"
func runUpdate(ctx context.Context, args []string) error {
if len(args) > 0 {
if runtime.GOOS == "linux" && distro.Get() == distro.Gokrazy {
gokArgs, err := gokrazyUpdateArgsFromMagicArg(args)
if err != nil {
return err
}
if gokArgs != nil {
return clientupdate.GokrazyUpdateFromURL.Get()(ctx, *gokArgs)
}
}
return flag.ErrHelp
}
if updateArgs.version != "" && updateArgs.track != "" {
return errors.New("cannot specify both --version and --track")
}
err := clientupdate.Update(clientupdate.Arguments{
Version: updateArgs.version,
Track: updateArgs.track,
Logf: func(f string, a ...any) { printf(f+"\n", a...) },
Stdout: Stdout,
Stderr: Stderr,
Confirm: confirmUpdate,
})
if errors.Is(err, errors.ErrUnsupported) {
return errors.New("The 'update' command is not supported on this platform; see https://tailscale.com/s/client-updates")
}
return err
}
func confirmUpdate(ver string) bool {
if updateArgs.yes {
fmt.Printf("Updating Tailscale from %v to %v; --yes given, continuing without prompts.\n", version.Short(), ver)View on GitHub (pinned to cfe32b8be6)
Solutions
- Keep exactly one: `tailscale update --version 1.62.0` or `tailscale update --track stable`
- Run bare `tailscale update` to update within the current track
- Audit shell aliases/scripts that auto-append --track
Example fix
# before $ tailscale update --version 1.62.0 --track stable # after $ tailscale update --version 1.62.0
Defensive patterns
Strategy: validation
Validate before calling
if updateArgs.version != "" && updateArgs.track != "" {
return errors.New("specify either --version or --track, not both")
} Prevention
- Keep update flag templating single-source in scripts
- Default to bare `tailscale update` for channel-following
- Lint wrappers that append --track unconditionally
When it happens
Trigger: Running `tailscale update --version 1.62.0 --track stable`; flags parsed from config, alias, or wrapper scripts supplying both.
Common situations: Wrapper scripts appending --track while an operator added --version; copy-paste combining flags from two docs examples; automation defaults injecting --track with an explicit pin.
Related errors
- unexpected non-flag arguments to 'tailscale status'
- usage: tailscale lock sign <node-key> [<rotation-key>]
- usage: tailscale lock disable <disablement-secret>
- on Linux, pass --disk=/dev/sdX (auto-discovery is macOS-only
- unknown arguments
AI-assisted analysis of tailscale/tailscale@cfe32b8be6 (2026-08-15).
Data as JSON: /api/errors/010057970f6b5c1e.
Report an issue: GitHub.