Leaving Soon¶
Deleterr's signature feature - a "death row" pattern that gives users time to watch content before it's deleted.
How It Works¶
Unlike traditional cleanup tools that delete content immediately, Deleterr implements a two-phase deletion process:
graph LR
A[Media matches<br/>deletion criteria] --> B[First Run:<br/>Tag item]
B --> C[User gets<br/>notification]
C --> D[Next Run:<br/>Delete item]
- First run: Items matching deletion criteria are tagged (added to a Plex collection and/or labeled), but NOT deleted
- Users are notified: Email, Discord, Slack, or Telegram alerts inform users about expiring content
- Subsequent runs: Previously tagged items are deleted, new candidates are tagged
This gives your users a "warning period" to watch content before it's removed.
Configuration¶
Basic Setup¶
Add the leaving_soon section to your library configuration:
libraries:
- name: "Movies"
radarr: "Radarr"
action_mode: "delete"
leaving_soon:
batch_size: 10
duration: "7d"
collection:
name: "Leaving Soon"
Batch Size¶
| Property | Type | Default | Description |
|---|---|---|---|
batch_size | integer | max_actions_per_run | How many items enter the Leaving Soon collection per cycle |
When batch_size is set, preview_next is no longer required and can be omitted or set to 0.
max_actions_per_run is ignored
When leaving_soon is configured, max_actions_per_run has no effect on the death row path. Use batch_size to control the number of items per cycle instead. If max_actions_per_run is explicitly set, Deleterr will log a warning.
Duration¶
The duration property controls how long items stay in the "Leaving Soon" state before deletion. When set, the exact deletion date is displayed in notifications and the Plex collection description, giving users a clear deadline.
| Property | Type | Default | Description |
|---|---|---|---|
duration | string | (none) | How long items stay before deletion. Format: <number>d for days or <number>h for hours |
Examples: 7d (7 days), 24h (24 hours), 30d (30 days)
If duration is not set, Deleterr will try to derive the deletion date from the scheduler interval. If neither is available, notifications will use the generic "next cleanup cycle" text.
Collection Settings¶
| Property | Type | Default | Description |
|---|---|---|---|
name | string | - | Name of the Plex collection to create |
Label Settings¶
You can also add labels to items instead of (or in addition to) collections:
| Property | Type | Default | Description |
|---|---|---|---|
name | string | - | Label to apply to items scheduled for deletion |
User Notifications¶
Configure notifications to alert users about content leaving soon. See Notifications for full setup details.
notifications:
leaving_soon:
subject: "Content leaving your Plex server soon!"
email:
smtp_server: "smtp.gmail.com"
smtp_port: 587
smtp_username: !env SMTP_USERNAME
smtp_password: !env SMTP_PASSWORD
use_tls: true
from_address: "plex@yourdomain.com"
to_addresses:
- "user1@example.com"
- "user2@example.com"
Example Workflow¶
Here's what happens during a typical Deleterr run with Leaving Soon enabled:
Week 1: First Run¶
- Deleterr identifies 15 movies matching deletion criteria
- Movies are added to the "Leaving Soon" collection in Plex
- Users receive email notification listing the 15 movies
- No deletions occur
Week 2: Second Run¶
- Deleterr identifies the same 15 movies are still tagged
- Those 15 movies are deleted from Radarr
- New movies matching criteria are tagged for the next cycle
- Users receive notification about newly tagged items
User Watches a Movie¶
If a user watches a movie that's in the "Leaving Soon" collection:
- The watch history is updated in Tautulli
- On next run, the movie no longer matches the
last_watched_thresholdcriteria - The movie is removed from the "Leaving Soon" collection
- The movie survives deletion
Tips¶
Adjust Thresholds for Your Schedule¶
Match your thresholds to your Deleterr schedule:
| Schedule | Recommended last_watched_threshold |
|---|---|
| Weekly | 90+ days |
| Daily | 14+ days |
| Monthly | 180+ days |
Use Plex Home Screen¶
Pin the "Leaving Soon" collection to your Plex home screen so users see it prominently:
- In Plex, navigate to the "Leaving Soon" collection
- Click the three dots menu
- Select "Add to Home"
Combine with Disk Thresholds¶
Leaving Soon works well with disk thresholds - items are only tagged when disk space is low:
libraries:
- name: "Movies"
radarr: "Radarr"
action_mode: "delete"
disk_size_threshold:
- path: "/data/media"
threshold: 500GB
leaving_soon:
batch_size: 10
collection:
name: "Leaving Soon"
Troubleshooting¶
Collection Not Appearing in Plex¶
- Verify Plex URL and token are correct in your config
- Check Deleterr logs for Plex API errors
- Ensure
batch_sizeorpreview_nextis greater than 0 - Run with
dry_run: false- collections are only created in non-dry-run mode
Items Not Being Deleted¶
- Confirm items were tagged in a previous run
- Check that items still match deletion criteria
- Verify
action_mode: "delete"is set - Look for exclusion rules that might be protecting the content
Notifications Not Sending¶
See Notifications Troubleshooting for notification-specific issues.