Skip to content

Rolling Retention

Rolling retention is the right workflow if you want this tool to act more like maintenance than a one-time purge.

The goal is simple:

  • keep a recent slice of history
  • delete older content
  • rerun the command regularly with predictable results

The key flags behind this workflow are:

Time-only retention

Initial run:

Terminal window
delete-me-discord --preserve-n 0 --preserve-last "weeks=2" --dry-run

Recurring daily run:

Terminal window
delete-me-discord --preserve-n 0 --preserve-last "weeks=2" --fetch-max-age "weeks=2,days=1" --dry-run

Time and count retention

Initial run:

Terminal window
delete-me-discord --preserve-last "weeks=2" --preserve-n 20 --preserve-cache --dry-run

Recurring daily run:

Terminal window
delete-me-discord --preserve-last "weeks=2" --preserve-n 20 --fetch-max-age "weeks=2,days=1" --preserve-cache --dry-run

Guidance

For recurring runs, set --fetch-max-age slightly wider than your retention window so the tool can still see the transition boundary cleanly.

Examples:

  • keep the last 2 weeks: use --preserve-last with --preserve-last "weeks=2"
  • process only the recent slice on recurring runs: use --fetch-max-age with --fetch-max-age "weeks=2,days=1"
  • keep a minimum number of recent messages too: add --preserve-n

If you also use --preserve-n, the Preserve Cache page explains why caching preserved IDs helps repeated runs stay stable.

If you are unsure about the accepted time formats, see Time Deltas.