Shrinkarr - Shrink your qBittorrent Downloads Folder by Magnitudes reddit / selfhosted ---------------------------------------------------------------------- Dan6erbond2 · 2023-12-11 10:48 [Shrinkarr](https://github.com/Dan6erbond/shrinkarr) is a support tool for the \*Arr stack, that can automatically delete torrents by size or completion date once a given free space threshold has been reached. Users can limit the categories that Shrinkarr is allowed to remove. While other tools such as [Prunerr](https://github.com/rpatterson/prunerr) already exist to only remove torrents that have been upgraded in the \*Arr apps. However, sometimes the \*Arr apps and download client don't share the same disk, in which case you might want a simpler approach of deleting items once a certain free space threshold has been reached. Once you provide the configuration either as a `.env` file or by setting environment variables manually, Shrinkarr will go through qBittorrent's downloads and find either the oldest by completion date or largest and remove those if the free space threshold has been reached. Shrinkarr can be run with Python or Docker: # With Python # Install dependencies, only needed once $ python3 -m pip install -r requirements.txt # Run Shrinkarr $ python3 -m shrinkarr.main # With Docker $ docker run shrinkarr:latest # With Docker, self-managed CRON, every five minutes $ docker run shrinkarr:latest --entrypoint 'cron' The Docker image hasn't been published yet. So currently users need to build their own or use the Python script directly. Sample `.env` file: SHRINKARR_QBIT_HOST=https://qbit.example.com/ SHRINKARR_QBIT_USER=admin SHRINKARR_QBIT_PASSWORD="" SHRINKARR_MONITOR_PATH=/mnt/media SHRINKARR_FREE_SPACE=250GB SHRINKARR_ALLOWED_CATEGORIES=tv-sonarr,radarr ---------------------------------------------------------------------- XxNerdAtHeartxX · 2023-12-11 16:08 Why not use QBit_Manage which lets you set seedtime rules by tracker, category, and more, and will auto-prune non-hardlinked files by specified tracker, and do a heck of a lot more? ---------------------------------------------------------------------- Dan6erbond2 · 2023-12-11 17:00 Honestly because I didn't know it existed and looking at it I can't really figure out how I can configure it to do what I want but I might need to give it a more in-depth look. My solution is simple and clean. ---------------------------------------------------------------------- TwinHaelix · 2023-12-11 19:02 Given the name, I thought this would be something like dynamically shifting downloads to a compressed filesystem to save disk space or something. ---------------------------------------------------------------------- theblindness · 2023-12-11 23:03 Getting really sick of everyone piggybacking off of the \*arr name for their little helper scripts that have nothing to do with the Servarr suite of apps forked from Sonarr. ---------------------------------------------------------------------- -SHINSTER007 · 2023-12-12 01:29 thanks for sharing! any other extensions/plugins you can think of ---------------------------------------------------------------------- Large_Yams · 2023-12-12 07:09 This is what I use too. By far the superior solution. Ultimately anything I have hardlinked I continue to seed because it takes up next to no space. Anything not hardlinked gets removed after seed times have been met. ---------------------------------------------------------------------- Firenyth · 2023-12-12 09:08 I just use deluge's autoremove plus. ​ I thought this was some cool compression system to keep disk space available for seeding longer ---------------------------------------------------------------------- Dan6erbond2 · 2023-12-13 09:07 In my case the categories is how I control it to only remove non- hardlinked files. Sonarr and Radarr copy things over to the NAS so those files need to be removed from qBit when the drive starts getting full. But I get that checking if a file is hardlinked is a very elegant solution, too. ---------------------------------------------------------------------- Dan6erbond2 · 2023-12-13 09:07 To be honest I agree. But I also didn't know how else to name it since Prunerr was already taken, and a short name improves discoverability. ---------------------------------------------------------------------- Large_Yams · 2023-12-13 18:01 Your completed files folder can be on the nas, seeding from there, while the files get hardlinked to your libraries.