Back to the guides

PRACTICAL SOFTWARE GUIDE

n8n execution data: set retention and pruning without losing diagnostics

Keep the failures and annotated evidence needed for operations while avoiding unlimited storage of routine successful executions.

SOURCE-BASED ANALYSIS · NO HANDS-ON RATING

Start from the evidence an operator needs

n8n can save different execution categories and prune completed execution data by age or count. The official self-hosting guidance recommends avoiding unnecessary saved data and enabling pruning. A retention policy should still preserve enough failed execution detail to diagnose errors and enough approved evidence for the workflow's operational requirements.

Build a retention matrix

For a fictional low-risk synchronization, decide separately whether to retain successful, failed and manual executions. Record the required investigation window and any external audit evidence before choosing values.

Execution classProposed treatmentReason
Successful routine runShort retention or no saved payloadLimit repetitive storage
Failed production runRetain for investigation windowSupport diagnosis and retry
Manual development runKeep only when neededAvoid test-data accumulation
Annotated incidentPreserve under incident policyRetain reviewed evidence

Understand both pruning thresholds

n8n documents age and count conditions for pruning finished executions. When either threshold applies, older eligible data can be removed. Running and waiting executions are not eligible, and annotated executions are preserved. Pruning uses a soft-delete and later hard-delete process, so an immediate database-size change should not be assumed.

  1. Inventory execution volume and payload sensitivity.
  2. Define the investigation and evidence windows.
  3. Choose save rules for success, error and manual runs.
  4. Set age and count pruning boundaries.
  5. Create synthetic success and failure executions.
  6. Verify operators can find the retained failure evidence.
  7. Monitor database growth after the policy change.

Account for storage implementation

For default SQLite storage, pruned space may be reused without shrinking the database file unless a separate vacuum action is configured. Binary-data storage also needs its own review. Accept the policy when routine volume remains bounded and a controlled failure can still be explained and retried. This guide is not a sizing benchmark or a substitute for backup policy.

Sources and verification

Official documentation checked on 2026-10-29. Worked examples are hypothetical planning exercises, not measured product benchmarks.

Continue your evaluation

Practical guides for this topic

Put your tools to work.

Need help choosing or setting up your tools? Tell Koldia what you want to improve.

Discuss your project