This script allows you to bulk rename tags in Radarr. It supports dry-run previews, backups, and manual or automatic confirmation.
- Bulk replace characters in tags (e.g.,
_→-) - Dry-run preview mode (default)
- Update first N tags only
- Per-tag confirmation or accept-all option
- Creates backups of tags and full Radarr DB
- Safe for older Bash and QNAP systems
- Highlighting of updated tags in summary
This script has been tested only on the following system: QNAP TVS-h1288X, firmware QuTS hero h5.2.7.3297. It will most likely also work on other systems, since it is Bash < 4 compatible.
Note: When running the script with a very large number of tags (e.g., >1000), some tags may not update on the first run. This usually occurs if there are duplicate tag labels or if the API processes many updates quickly. Running the script a second time will typically apply any remaining updates.
If some tags still exist after a second run, it is likely due to multiple tag objects with the same label in Radarr. These must be updated or merged manually using the Radarr UI or API to ensure all movies have the updated tag.
- Bash environment (runs on older bash < 4)
jq(tested on jq 1.5)curl
-
Copy the
.env.templateto.env:cp .env.template .env
-
Edit
.envand set your Radarr URL, API key, and optional replacement characters:API_KEY=your_radarr_api_key RADARR_URL=http://127.0.0.1:7878 REPLACE_FROM=_ REPLACE_TO=-
./radarr_tag_updater.sh [options]| Option | Description |
|---|---|
--dry-run, -dr |
Preview changes without updating (default) |
--replace-from=CHAR, -rf |
Character to search for in tags (overrides .env) |
--replace-to=CHAR, -rt |
Character to replace with in tags (overrides .env) |
--first=N, -n |
Only update the first N matching tags |
--force, -f |
Apply changes (overrides dry-run) |
--accept-all, -a |
Accept all changes automatically, skip per-tag confirmation |
--restore=TIMESTAMP, -r |
Restore tags and DB backup of a certain timestamp (may require manual restore depending on Radarr version) |
--help, -h |
Show this help message |
- Tag backups are saved as
backups/tag_backup_<timestamp>.json - Full Radarr backups are saved as
backups/radarr_full_backup_<timestamp>.zip - Backups are only created when changes are applied, not in dry-run mode.
- Restoring may require manual steps depending on Radarr version.
- The script builds JSON manually instead of using
--argjsonfor maximum compatibility with older jq versions on QNAP. - IDs are trimmed of whitespace and carriage returns to prevent errors.
- The script highlights the entire new tag in bold bright cyan for clarity.
- Dry-run mode is default; no changes are applied unless
--forceis used. - Tested only on QNAP TVS-h1288X, firmware QuTS hero h5.2.7.3297.
- For very large numbers of tags, some updates may not apply on the first run; a second run will typically complete the remaining updates.
- If some tags still exist after a second run, this is likely due to duplicate tag objects with the same label in Radarr. These remaining tags must be handled manually to ensure all movies are updated.
Dry-run preview (default):
./radarr_tag_updater.shForce update first 2 tags:
./radarr_tag_updater.sh -f -n=2Replace _ with - and accept all automatically:
./radarr_tag_updater.sh -f -a -rf=_ -rt=-Restore backups from a specific timestamp:
./radarr_tag_updater.sh --restore=20251124_123456MIT