This is a web application, created to help you manually delete files present in the torrent client (completed/) downloads folder but not in the (Jellyfin) medias/ folder. If you have separated folders it'll also works.
Removarr is a web application designed to assist the *arr apps like Radarr and Sonarr by helping you automatically identify and manually delete duplicate files from your torrent client download folder that are already present in your Jellyfin library.
Supported torrent clients:
- Transmission
- qBittorrent
Take a look at the screenshot of the web-app:
Imagine you've downloaded a movie through Radarr. It's stored in your torrent client download folder and automatically hardlink to your Jellyfin library. Later, Radarr finds a better version, which also downloaded and hardlinked to Jellyfin, replacing the older one. Howerver, both versions remain in your torrent client download folder. So here comes Removarr. It will automatically identifies these duplicates, allowing you to delete them easily.
A recursive comparison according to the inodes of the files is made between the completed/ folder (on the torrent client side) and the folders where the media are stored (on the Jellyfin side).
Example 1:
├── completed # Transmission side
│ ├── folder1
│ ├── ...
│ ├── files
│ └── ...
└── medias # Jellyfin side
├── movies
│ ├── folders
│ └── ...
└── series
├── folders
└── ...
Example 2:
├── completed # Transmission side
│ ├── folder1
│ ├── ...
│ ├── files
│ └── ...
├── movies # Jellyfin side
│ ├── files
│ ├── folders
│ │ └── ...
│ └── ...
└── series # Jellyfin side
├── files
└── folders
└── ...
All the files present on the side of Jellyfin are the latest versions that we want to keep. So, all we want to remove is everything that is present on the Transmission side but not on the Jellyfin side.
If the deleted file was in a folder:
- if the folder is now empty, then the folder is deleted
- if the folder does not contain other files with extension '.mkv', '.mp4', '.avi', '.mov', then the folder is deleted
- if the folder does not contain subfolder(s), the folder is deleted
I'm using this app on a Synology NAS.
I have 2x6TB HDD in RAID 1. The filesystem of my main volume (/volume1) is in Btrfs.
To try if the file was properley deleted and if I recovered the storage, I ran this command before and after the deletion of the file:
$ btrfs fi usage /volume1/ -gI deleted a file of about 1,9 GB. Here is the diff before and after the deletion:
Overall:
Device allocated: 2884.02GiB
Device unallocated: 2693.98GiB
Device missing: 0.00GiB
- Used: 2843.89GiB
- Free (estimated): 2732.34GiB (min: 1385.35GiB)
+ Used: 2842.04GiB
+ Free (estimated): 2734.20GiB (min: 1387.21GiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 0.28GiB (used: 0.00GiB)
-Data,single: Size:2880.01GiB, Used:2841.64GiB
+Data,single: Size:2880.01GiB, Used:2839.79GiB
/dev/mapper/cachedev_0 2880.01GiBNothing more simple than to use the docker-compose file.
Environment Variables:
Set CLIENT_TYPE to either transmission (default) or qbittorrent:
- For Transmission: Set
TR_IP,TR_PORT,TR_USERNAME,TR_PASSWORD - For qBittorrent: Set
QBIT_HOST,QBIT_PORT,QBIT_USERNAME,QBIT_PASSWORD
- First option: (like the example above) you have one folder for all your media, use this file:
services:
removarr:
image: ghcr.io/garnajee/removarr:latest
container_name: removarr
restart: always
environment:
- PUID=1030
- PGID=100
# Set CLIENT_TYPE to "transmission" or "qbittorrent"
- CLIENT_TYPE=${CLIENT_TYPE:-transmission}
# Transmission settings
- TR_IP=${TR_IP}
- TR_PORT=${TR_PORT}
- TR_USERNAME=${TR_USERNAME}
- TR_PASSWORD=${TR_PASSWORD}
# qBittorrent settings
- QBIT_HOST=${QBIT_HOST}
- QBIT_PORT=${QBIT_PORT:-8080}
- QBIT_USERNAME=${QBIT_USERNAME}
- QBIT_PASSWORD=${QBIT_PASSWORD}
volumes:
- '/your/path/completed/:/data/completed'
- '/your/path/medias/:/data/medias'
ports:
- '127.0.0.1:8012:5000'- Second option: you have several folders not in the same place, use this file:
services:
removarr:
image: ghcr.io/garnajee/removarr:latest
container_name: removarr
restart: always
environment:
- PUID=1030
- PGID=100
# Set CLIENT_TYPE to "transmission" or "qbittorrent"
- CLIENT_TYPE=${CLIENT_TYPE:-transmission}
# Transmission settings
- TR_IP=${TR_IP}
- TR_PORT=${TR_PORT}
- TR_USERNAME=${TR_USERNAME}
- TR_PASSWORD=${TR_PASSWORD}
# qBittorrent settings
- QBIT_HOST=${QBIT_HOST}
- QBIT_PORT=${QBIT_PORT:-8080}
- QBIT_USERNAME=${QBIT_USERNAME}
- QBIT_PASSWORD=${QBIT_PASSWORD}
volumes:
- '/your/path/completed/:/data/completed'
- '/your/path/movies/:/data/movies'
- '/your/path/series/:/data/series'
ports:
- '127.0.0.1:8012:5000'The application will be available at <you_ip>:8012.
- Volumes
/your/path/completed/: change this by the path of your download folder
/your/path/medias/ : change this by the path of your Jellyfin medias folder
- Port
8012: change this port to suit your needs.
- add
.movextension - add "(folder)" before name in table if it's a folder
- add
user: "${PUID}:${PGID}in docker compose files - update README to specify how to use the .env file
- update tests/README to explain how to source .env file when not using the removarr docker (
set -/+ a...) - add total size of all files
- add size of each file in a column
- sort table by alphabetic order and file size
- add an "unwanted" button, hide files to avoid deleting them by mistake
- make the app more responsive
To build this application, follow these steps:
- clone the repository:
- using
git:git clone https://github.com/garnajee/removarr.git - or using
curl:
- using
curl -L https://github.com/garnajee/removarr/archive/master.tar.gz -o removarr.tar.gz
tar xzf removarr.tar.gz
rm removarr.tar.gz
mv removarr-master removarrcd removarr- build the Dockerfile:
$ docker build -t <your_image_name> . - run the image:
$ docker run -p 5000:5000 -v /your/path/completed:/data/completed -v /your/path/medias:/data/medias <your_image_name>
If you want to use a docker-compose.yml instead of the Dockerfile, then use this example:
removarr:
- image: ghcr.io/garnajee/removarr:latest
...
removarr:
+ build: .
...- you can now build this docker-compose.yml:
$ docker-compose build - and finally, run:
$ docker-compose up -d
This project is under MIT License.

