Skip to content

lynxpm restart

Terminal window
lynxpm restart [--namespace <ns>] [--json] <id|name|ns:*|*>...

Restarts the specified processes. This sends a stop signal followed by starting the process again with the same configuration.

Bulk selectors:

  • <ns>:* — every process in that namespace. Quote the glob so the shell does not expand it: lynxpm restart 'prod:*'.
  • * or *:* — every managed process.
  • --namespace <ns> — same as <ns>:* but no shell quoting needed. Cannot be combined with positional targets.
FlagTypeDefaultDescription
--namespace <ns>string-Restart every process in this namespace. Mutually exclusive with positional targets.
--jsonbooleanfalseEmit a machine-readable {results, summary} batch report on stdout.
--no-listbooleanfalseSkip the process list printed after the action. The restarted instances are otherwise highlighted (▸) in the list for easy scanning.
-h, --help--Show help message.

Restart a process:

Terminal window
lynxpm restart my-app

Restart every process in the prod namespace:

Terminal window
lynxpm restart 'prod:*' # selector form (quote the glob)
lynxpm restart --namespace prod # flag form (script-friendly)

Restart many, capture outcomes as JSON:

Terminal window
lynxpm restart api worker-1 worker-2 --json | jq '.results[] | {id, status}'
  • 0 — every target was restarted.
  • non-zero — at least one target failed; the per-target line (or .results[].error in --json) explains why.