lynxpm flush
📖 Synopsis
Section titled “📖 Synopsis”lynxpm flush [--namespace <ns>] [--json] <id|name|ns:*|*>...Description
Section titled “Description”Truncate the stdout/stderr log files for a process. Resolves and validates
log paths before truncation to avoid unsafe operations. The human-readable
output reports how many bytes were freed per target; --json surfaces the
same number at .results[].extra.bytes_freed.
Bulk selectors:
<ns>:*— every process in that namespace. Quote the glob so the shell does not expand it:lynxpm flush 'prod:*'.*or*:*— every managed process.--namespace <ns>— same as<ns>:*but no shell quoting needed. Cannot be combined with positional targets.
⚙️ Flags
Section titled “⚙️ Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--namespace <ns> | string | - | Flush every process in this namespace. Mutually exclusive with positional targets. |
--json | boolean | false | Emit a machine-readable {results, summary} batch report on stdout. |
-h, --help | - | - | Show help message. |
🚀 Examples
Section titled “🚀 Examples”Flush logs for one process:
lynxpm flush my-apiFlush logs for multiple:
lynxpm flush api-1 api-2Flush every process in the prod namespace:
lynxpm flush 'prod:*' # selector form (quote the glob)lynxpm flush --namespace prod # flag form (script-friendly)Total bytes reclaimed across a batch:
lynxpm flush api-1 api-2 --json | jq '[.results[].extra.bytes_freed] | add'Exit codes
Section titled “Exit codes”0— every target was flushed.- non-zero — at least one target failed; per-target lines (or
.results[].errorin--json) explain why.