GoodMem
ReferenceCLI

System Purge-Jobs

System Purge-Jobs CLI command reference

goodmem system purge-jobs

Purge completed background jobs

Synopsis

Delete historical background job records from the GoodMem server.

You must specify the retention threshold via --older-than, either as a duration (for example "72h", "7d", "1w12h") or an RFC3339 timestamp (for example "2024-10-20T15:04:05Z"). The server enforces a minimum retention period of one hour.

goodmem system purge-jobs [flags]

Examples

  # Dry-run purge for jobs completed more than 72 hours ago
  goodmem system purge-jobs --older-than 72h --dry-run

  # Permanently delete succeeded and failed jobs older than 7 days
  goodmem system purge-jobs --older-than 7d --status succeeded --status failed

  # Purge with explicit timestamp and JSON output
  goodmem system purge-jobs --older-than 2024-10-20T15:04:05Z --output json

Options

      --dry-run             Report how many records would be deleted without removing them
  -h, --help                help for purge-jobs
      --limit int           Maximum number of jobs to purge (0 for no limit)
      --older-than string   Retention cutoff as duration (e.g., 72h, 7d, 1w12h) or RFC3339 timestamp
      --output string       Output format: text or json (default "text")
      --status strings      Job statuses to purge: succeeded, failed, canceled (repeatable)

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server address (gRPC API) (default "https://localhost:9090")

SEE ALSO