All apps · 0 apps
cross-seed-cleanup
Docker app from mcreekmore's Repository
Overview
Readme
View on GitHub
cross-seed-cleanup
Identify and tag qBittorrent torrents that exist only for cross-seeding and aren't hardlinked into your media library.
Overview
Tools like qbit_manage can detect torrents with no hardlinks, but once cross-seed is in the mix those checks become unreliable. Cross-seeded torrents hardlink to each other, making them appear linked even when nothing points back to your media library.
cross-seed-cleanup solves this by comparing filesystem hardlink counts against the number of qBittorrent torrents referencing the same inodes. Torrents whose files are only linked by other torrents (and not by Sonarr, Radarr, etc.) are tagged for easy bulk removal, helping you reclaim disk space.
Features
- Inode-level hardlink analysis to detect externally linked files
- Flexible filtering by tag, category, and torrent age
- Dry-run mode enabled by default for safe operation
- Optional cron scheduling for recurring cleanup
- Lightweight Docker image (Alpine-based)
Quick Start
docker run --rm \
-v /mnt/user/data:/data:ro \
-e QB_HOST=192.168.1.100 \
-e QB_PASSWORD=yourpassword \
-e DRY_RUN=true \
ghcr.io/mcreekmore/cross-seed-cleanup:latest
Set DRY_RUN=false to apply tags.
Configuration
| Variable | Default | Required | Description |
|---|---|---|---|
QB_HOST |
localhost |
No | qBittorrent Web UI host (or qui) |
QB_PORT |
8080 |
No | qBittorrent Web UI port (or qui) |
QB_USERNAME |
admin |
No | qBittorrent Web UI username (not needed for qui) |
QB_PASSWORD |
Yes* | qBittorrent Web UI password (not needed for qui) | |
QB_API_KEY |
Yes* | qui API key (only needed for qui) | |
TAG_REMOVABLE |
cross-seed-only |
No | Tag applied to removable torrents |
EXCLUDE_TAGS |
pinned,keep |
No | Tags to skip (comma-separated) |
EXCLUDE_CATEGORIES |
No | Categories to skip (comma-separated) | |
INCLUDE_CATEGORIES |
No | Only process these categories (comma-separated) | |
MIN_AGE_DAYS |
0 |
No | Minimum torrent age in days |
DRY_RUN |
true |
No | Report only; set false to apply tags |
SCHEDULE |
No | Cron expression for recurring runs (e.g. 0 */6 * * *) |
|
RUN_ON_START |
true |
No | Run immediately before entering cron schedule |
* Provide either QB_PASSWORD (with QB_USERNAME) or QB_API_KEY, not both.
Unraid
An Unraid Community Applications template is included (cross-seed-cleanup.xml). Install via the Apps tab or add the template manually.
How It Works
- Stat - Retrieves all torrents from qBittorrent and stats each file to collect inode/hardlink data.
- Classify - Compares each file's hardlink count (
nlink) against the number of torrents referencing the same inode. Files with external hardlinks are kept. - Tag - Torrents with no externally linked files are tagged as removable for bulk deletion in qBittorrent.
Install cross-seed-cleanup on Unraid in a few clicks.
Find cross-seed-cleanup in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/mcreekmore/cross-seed-cleanup:latestRuntime arguments
- Network
bridge- Shell
bash- Privileged
- false
Template configuration
Path to your torrent data. Must match the paths qBittorrent uses.
- Default
- /mnt/user/data
- Value
- /mnt/user/data
qBittorrent Web UI host (IP or hostname).
- Default
- localhost
- Value
- localhost
qBittorrent Web UI port.
- Default
- 8080
- Value
- 8080
qBittorrent Web UI username.
- Default
- admin
- Value
- admin
qBittorrent Web UI password. Required unless QB_API_KEY is set.
qui API key for proxy authentication. Use this instead of QB_USERNAME/QB_PASSWORD.
Tag applied to torrents that can be safely removed.
- Default
- cross-seed-only
- Value
- cross-seed-only
Comma-separated tags to skip (torrents with these tags are never marked removable).
- Default
- pinned,keep
- Value
- pinned,keep
Comma-separated categories to skip entirely.
Comma-separated categories to check. If empty, all categories are checked.
Only tag torrents older than this many days. 0 to disable.
- Default
- 0
- Value
- 0
Cron expression for scheduled runs (e.g. '0 */6 * * *' for every 6 hours). If empty, runs once and exits.
Run immediately on container start before entering the cron schedule. Only applies when SCHEDULE is set.
- Default
- true
- Value
- true
Set to false to actually apply tags. When true, only reports what would be tagged.
- Default
- true
- Value
- true