cross-seed-cleanup

cross-seed-cleanup

Docker app from mcreekmore's Repository

Overview

Identifies torrents that are only used for cross-seeding and not hardlinked into a media library (Sonarr/Radarr). Compares filesystem hardlink counts against qBittorrent torrent references to find reclaimable space.

cross-seed-cleanup

Identify and tag qBittorrent torrents that exist only for cross-seeding and aren't hardlinked into your media library.

Build Release Go Report Card License


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

  1. Stat - Retrieves all torrents from qBittorrent and stats each file to collect inode/hardlink data.
  2. Classify - Compares each file's hardlink count (nlink) against the number of torrents referencing the same inode. Files with external hardlinks are kept.
  3. 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.

Open the Apps tab on your Unraid server Search Community Apps for cross-seed-cleanup Review the template variables and paths Click Install

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/mcreekmore/cross-seed-cleanup:latest
Last Updated2026-07-18
First Seen2026-02-10

Runtime arguments

Network
bridge
Shell
bash
Privileged
false

Template configuration

/dataPathro

Path to your torrent data. Must match the paths qBittorrent uses.

Default
/mnt/user/data
Value
/mnt/user/data
QB_HOSTVariable{3}

qBittorrent Web UI host (IP or hostname).

Default
localhost
Value
localhost
QB_PORTVariable{3}

qBittorrent Web UI port.

Default
8080
Value
8080
QB_USERNAMEVariable{3}

qBittorrent Web UI username.

Default
admin
Value
admin
QB_PASSWORDVariable{3}

qBittorrent Web UI password. Required unless QB_API_KEY is set.

QB_API_KEYVariable{3}

qui API key for proxy authentication. Use this instead of QB_USERNAME/QB_PASSWORD.

TAG_REMOVABLEVariable{3}

Tag applied to torrents that can be safely removed.

Default
cross-seed-only
Value
cross-seed-only
EXCLUDE_TAGSVariable{3}

Comma-separated tags to skip (torrents with these tags are never marked removable).

Default
pinned,keep
Value
pinned,keep
EXCLUDE_CATEGORIESVariable{3}

Comma-separated categories to skip entirely.

INCLUDE_CATEGORIESVariable{3}

Comma-separated categories to check. If empty, all categories are checked.

MIN_AGE_DAYSVariable{3}

Only tag torrents older than this many days. 0 to disable.

Default
0
Value
0
SCHEDULEVariable{3}

Cron expression for scheduled runs (e.g. '0 */6 * * *' for every 6 hours). If empty, runs once and exits.

RUN_ON_STARTVariable{3}

Run immediately on container start before entering the cron schedule. Only applies when SCHEDULE is set.

Default
true
Value
true
DRY_RUNVariable{3}

Set to false to actually apply tags. When true, only reports what would be tagged.

Default
true
Value
true