{"id":16226064,"url":"https://github.com/dan6erbond/shrinkarr","last_synced_at":"2025-04-08T03:43:29.828Z","repository":{"id":211877421,"uuid":"730145436","full_name":"Dan6erbond/shrinkarr","owner":"Dan6erbond","description":"Shrink your qBittorrent downloads folder by magnitudes.","archived":false,"fork":false,"pushed_at":"2023-12-11T10:49:32.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T04:41:26.603Z","etag":null,"topics":["arr-stack","qbittorrent","servarr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dan6erbond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-11T09:55:35.000Z","updated_at":"2023-12-12T23:55:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2573d44-195d-463a-9b98-b939570014fe","html_url":"https://github.com/Dan6erbond/shrinkarr","commit_stats":null,"previous_names":["dan6erbond/shrinkarr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan6erbond%2Fshrinkarr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan6erbond%2Fshrinkarr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan6erbond%2Fshrinkarr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan6erbond%2Fshrinkarr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dan6erbond","download_url":"https://codeload.github.com/Dan6erbond/shrinkarr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773744,"owners_count":20993633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arr-stack","qbittorrent","servarr"],"created_at":"2024-10-10T12:47:44.825Z","updated_at":"2025-04-08T03:43:29.809Z","avatar_url":"https://github.com/Dan6erbond.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shrinkarr\n\nShrink your qBittorrent downloads folder by magnitudes.\n\nShrinkarr 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.\n\n## Motivation\n\nTools 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.\n\n## Running\n\nShrinkarr can be run with Python, or as a Docker container.\n\n### With Python\n\nSimply run the script once with Python, at least 3.10 is required:\n\n```sh\n# Install dependencies, only needed once\n$ python3 -m pip install -r requirements.txt\n# Run Shrinkarr\n$ python3 -m shrinkarr.main\n```\n\nA `.env` file must be present at the current location, or mandatory environment variables must be set. For more see [Configuration](#configuration).\n\n### With Docker\n\nThe Docker container can manage its own CRON job running every five minutes if you want to. In which case set the `--entrypoint` to `cron`:\n\n```sh\n$ docker run shrinkarr:latest --entrypoint 'cron'\n```\n\nIf you don't want the job to run every five minutes, just run the Docker container. This can be useful for managing your own scheduler e.g. with Kubernetes `CronJob`:\n\n```sh\n$ docker run shrinkarr:latest\n```\n\n## Configuration\n\nShrinkarr supports the following environment variables to configure its behavior.\n\n### qBittorrent\n\nGeneral qBittorrent settings to connect with download client.\n\n#### `SHRINKARR_QBIT_HOST` (mandatory, string)\n\nThe host of your qBittorrent instance. Must include http(s).\n\n#### `SHRINKARR_QBIT_USER` (mandatory, string)\n\nqBittorrent username.\n\nDefault: `admin`\n\n#### `SHRINKARR_QBIT_PASSWORD` (mandatory, string)\n\nqBittorrent password.\n\nDefault: `admin`\n\n### Monitoring path\n\nYou can configure the path that Shrinkarr should monitor, since usually it will be running in Docker with a mounted volume.\n\n#### `SHRINKARR_MONITOR_PATH` (mandatory, string)\n\nShrinkarr monitoring path. Should be absolute.\n\nExamples: `/mnt/media`\n\n### Free space\n\nYou can either configure the absolute free space or a ratio of the monitored path's size that Shrinkarr will use as the threshold to start deleting downloads.\n\n#### `SHRINKARR_FREE_SPACE` (string, human-readable size)\n\nFree space below which Shrinkarr will delete downloads.\n\nExamples: `20GB`, `2TB`\n\n#### `SHRINKARR_FREE_SPACE_RATIO` (float)\n\nRatio of the drive's total size below which Shrinkarr will delete downloads.\n\nExamples: `0.2`\n\n### Delete settings\n\n#### `SHRINKARR_MIN_DELETE_SIZE` (string, human-readable size)\n\nMinimum size of files that can be deleted.\n\nExamples: `20GB`, `2TB`\n\n#### `SHRINKARR_DELETE_BY_COMPLETED_ON` (bool)\n\nDelete torrents by completed on (oldest to newest).\n\nExamples: `true`\n\n#### `SHRINKARR_DELETE_BY_SIZE` (bool)\n\nDelete torrents by size (largest to smallest).\n\nExamples: `true`\n\n### Torrent settings\n\n#### `SHRINKARR_ALLOWED_CATEGORIES` (comma-separated list of strings)\n\nCategories for torrents that can be deleted.\n\nExamples: `radarr,tv-sonarr`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan6erbond%2Fshrinkarr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan6erbond%2Fshrinkarr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan6erbond%2Fshrinkarr/lists"}