-
Notifications
You must be signed in to change notification settings - Fork 0
DB Size Management
The db_trim worker purges old and dead torrents based on configurable per-source rules. It runs as a background service on a 24-hour cycle. Disabled by default — must be explicitly enabled.
Add to config.yml:
db_trim:
enabled: true
dry_run: false # start with true to preview what would be removed
protect_prowlarr_sources: true # never trim if a Prowlarr source exists
sources:
- source: dht
max_age_days: 180 # trim DHT torrents older than 6 months...
min_seeds: 1 # ...that have fewer than 1 seeder
ignore_no_seed_data: true # don't trim if seed count is unknown
- source: default
max_age_days: -1 # -1 = disabled
min_seeds: -1
ignore_no_seed_data: trueAdd --keys=db_trim to your compose command block. See Worker Keys.
-
AND logic: Both
max_age_daysANDmin_seedsmust be satisfied for a torrent to be trimmed - -1 = disabled: Setting either value to -1 disables that dimension of the check
- Per-source rules: Each source (dht, prowlarr-20, default) can have independent rules
-
Default source: The
defaultrule applies to any source not explicitly configured
When protect_prowlarr_sources: true (the default), any torrent that also exists in a Prowlarr source is exempt from trimming — regardless of other sources' rules. This preserves the key value of Prowlarr integration: content stays searchable even when the original indexer goes offline.
Set dry_run: true to preview what would be removed without actually deleting anything. Check the logs to see which torrents would be trimmed, then switch to dry_run: false when satisfied.
Aggressive DHT trim, keep Prowlarr forever:
db_trim:
enabled: true
protect_prowlarr_sources: true
sources:
- source: dht
max_age_days: 90
min_seeds: 0
ignore_no_seed_data: falseHoarder mode (keep everything, trim only confirmed-dead):
db_trim:
enabled: true
sources:
- source: dht
max_age_days: 365
min_seeds: 0
ignore_no_seed_data: trueDisabled (default — keep everything):
Don't add --keys=db_trim to your compose, or set enabled: false.
- Processes 1,000 rows per batch to avoid large transactions
- After deleting source links, torrents with no remaining source links are automatically deleted (FK CASCADE handles related tables)
- Runs once immediately on startup, then every 24 hours
- Worker logs rows removed per source per run