Yes, it is possible, but it's important to understand how Sonarr handles it.
Sonarr doesn't typically delete the final media files from your library directly after they've been moved and organized. Instead, its primary function related to deleting downloaded data involves instructing your download client to delete the files after they have been successfully processed.
Here's the breakdown:
Successful Downloads: When Sonarr finds a show, sends it to your download client (like SABnzbd, NZBGet, qBittorrent, etc.), verifies the download, and successfully moves/copies the relevant files (e.g., the video file) to your final media library location, it then sends a command to the download client. This command tells the client to delete the original downloaded files (including any temporary files, unpack logs, repair files, etc.) from the download client's storage location. This prevents duplicate storage and keeps your download folders clean.
Failed/Incomplete Downloads: Sonarr can also be configured to manage incomplete or failed downloads. Depending on your settings and the capabilities of your download client, Sonarr can trigger the deletion of these failed downloads from the download client after a certain period or based on specific failure conditions.
Deleting from Library (Less Common): If you want to delete a show entirely from your Sonarr management and your disk storage (i.e., remove it from your media library), you can stop monitoring the show in Sonarr. Depending on your Sonarr settings, it might prompt you or automatically delete the files from your media library location when you stop monitoring or delete the series entry. Be very careful with this function, as it permanently removes the files from your disk.
In summary: Sonarr's main way of "deleting downloaded data" is by telling your download client to clean up after itself once the files have been successfully grabbed, verified, and moved to their final destination in your media library.
User
i am using transmission client, tell me how to setup this in sonarr
Assistant
Okay, let's get Sonarr configured to tell Transmission to delete completed downloads after Sonarr has successfully imported them.
The key setting is within Sonarr's configuration for your Transmission client itself.
Steps:
Navigate to Sonarr Settings:
Open your Sonarr web interface.
Click on the Settings icon (usually a gear/cog) in the top menu bar.
Go to Download Clients:
In the left-hand sidebar under "Download Clients", click on Transmission.
(If you haven't added Transmission yet, click "Add Client", select Transmission, and fill in the connection details first.)
Configure Transmission Client Settings:
You should see the configuration screen for your Transmission client. If you're editing an existing one, click the pencil icon next to it.
Ensure the connection details are correct:
Host: The IP address or hostname of the machine running Transmission (e.g., 192.168.1.100 or localhost if it's on the same machine as Sonarr).
Port: The RPC port for Transmission. The default is usually 9091.
Username: If you have authentication enabled in Transmission.
Password: If you have authentication enabled in Transmission.
Category: (Optional but Recommended) Set a specific category that Sonarr will use when sending downloads to Transmission (e.g., sonarr). This helps keep things organized within Transmission.
Use SSL: Check this if you have SSL enabled for Transmission's RPC interface.
Enable Post-Import Deletion:
Scroll down within the Transmission client settings page.
Look for an option like "Remove Torrent from Client after Adding to Library" or "Delete Completed Downloads" (the exact wording might vary slightly depending on your Sonarr version).
Check this box. This is the crucial setting that tells Sonarr to instruct Transmission to remove the torrent and its associated downloaded files once Sonarr has successfully imported the media file(s).
Configure Completed Download Drying (Important):
User
i am using docker for sonarr and transmission, but this option 'remove torrent from client' does not remove downloaded files
Assistant
Okay, this is a very common issue when running Sonarr and Transmission in Docker, and it almost always boils down to how your Docker volumes are configured and how file permissions are handled.
Sonarr telling Transmission to "delete" relies on Transmission successfully performing that deletion on the filesystem. If the paths aren't correctly shared or permissions are wrong, Transmission might fail internally, or Sonarr might not realize the deletion happened correctly.
Here's a breakdown of potential causes and how to troubleshoot:
1. Incorrect Docker Volume Mapping for Download Directories
The Problem: Sonarr needs to know where Transmission downloads files so it can initiate the import. After import, it tells Transmission to delete. Transmission then performs the deletion on the filesystem. If Sonarr and Transmission don't have access to the same underlying directories on the host system for downloads, the process breaks.
How to Check/Fix:
Identify Transmission's Download Path: Look at your Transmission Docker container's configuration (e.g., docker-compose.yml). Find the volume mapping for Transmission's download directory. It will look something like this:
yaml
# transmission service
...
volumes:
- /path/on/host/transmission/downloads:/downloads # Example: Transmission downloads here inside its container
...
So, /path/on/host/transmission/downloads is where Transmission is saving files on your host machine.
Identify Sonarr's Download Client Path: In Sonarr's settings -> Download Clients, check the "Remote Path Mappings" section and also the specific path Sonarr uses when talking to Transmission (often derived from the category, but it needs to know the container path Transmission is using). More importantly, ensure Sonarr's own configuration for where completed downloads are expected aligns with where Transmission puts them.
Crucial Check: The directory that Sonarr scans for completed downloads (often the same directory Transmission uses, or a subdirectory within it) must be the exact same host path mapped into both containers.
Example docker-compose.yml structure:
yaml
Dataset releases
Not yet included in a published release.
Still within the Settings -> Download Clients section (or sometimes under Settings -> General), look for "Completed Download Drying".
This setting determines when Sonarr considers a download ready for import.
Ensure this is configured appropriately for your needs. Common options include:
"Do Nothing": Sonarr will try to import immediately after the download client reports it's finished.
"Check RSS Feed Again": Sonarr will wait for the next RSS feed update before checking.
"Wait for Specific Category": Not usually relevant for after import.
"Check Download Client": Sonarr checks the client's status.
For basic functionality, leaving it at the default or "Do Nothing" is often fine, but be aware of how it affects the timing. Many people use a specific category and rely on that.
Save Changes:
Click the Save button at the bottom of the configuration page.
How it Works:
Sonarr finds a desired episode/movie and sends the .torrent or .magnet link to Transmission using the specified category (e.g., sonarr).
Transmission downloads the files.
Sonarr periodically checks Transmission for completed downloads (using the category if specified).
When Sonarr detects a completed download it requested, it attempts to import the relevant media file (e.g., the .mkv or .mp4) into your library path.
If the import is successful: Sonarr sends a command to Transmission telling it to remove the torrent job and its associated downloaded data (original files, unpack logs, etc.) from Transmission's download directory. The actual media file is now safely in your library.
If the import fails: Sonarr will not tell Transmission to delete the download, leaving it available for troubleshooting or manual import.
Important Considerations:
Paths: Ensure Sonarr knows where Transmission downloads files (`Downloads Chunks" folder in Transmission settings) and where your final media library is located. Sonarr needs read/write access to both and the ability to move files.
Permissions: The user account running Sonarr needs appropriate permissions to access and potentially delete files in Transmission's download directories.
Categories: Using a specific category in Sonarr and configuring Transmission to handle that category (e.g., assigning it a specific save path) is highly recommended for clarity and reliability.
Transmission Settings: Make sure Transmission itself is configured to keep incomplete files where Sonarr can access them during the import process, and that it's set up to allow remote management via RPC.
Testing: Test with a small, insignificant download first to ensure the process works as expected before relying on it for large or important files. Monitor both Sonarr's activity and Transmission's status.
By enabling that "Remove Torrent from Client after Adding to Library" option, you tell Sonarr to clean up after itself with Transmission.
version: '3.8'
services:
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1000 # Your user ID
- PGID=1000 # Your group ID
- TZ=Etc/UTC
volumes:
- ./sonarr/config:/config
- /path/to/your/downloads:/downloads # <-- Mapped to the SAME host path
- /path/to/your/media:/media # <-- Your media library
ports:
- 8989:8989
restart: unless-stopped
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=1000 # Your user ID
- PGID=1000 # Your group ID
- TZ=Etc/UTC
volumes:
- ./transmission/config:/config
- /path/to/your/downloads:/downloads # <-- Mapped to the SAME host path
# Optional: Add a watch directory if Sonarr uses it
# - /path/to/your/watch:/watch
ports:
- 9091:9091
- 51413:51413 # UDP port
- 51413:51413/tcp # TCP port
restart: unless-stopped
# Define the volumes for clarity if needed, though inline mapping is common
# volumes:
# sonarr_config:
# transmission_config:
# shared_downloads:
In this example, /path/to/your/downloads on the host is mounted to /downloads inside both the Sonarr and Transmission containers. This is essential.
2. File Permissions (PUID/PGID)
The Problem: Even if the volumes are mapped correctly, the user inside the Transmission container might not have permission to delete files written by the user inside the Sonarr container (or vice-versa, or both lack permissions on the host path).
How to Check/Fix:
Ensure you are using PUID and PGID environment variables in your Docker configurations for both Sonarr and Transmission.
These IDs should match the user ID and group ID of the user who owns the download directories on your host system.
You can find your user ID and group ID on Linux/macOS by running id -u and id -g in your terminal.
If Transmission cannot write/delete files in the mapped /downloads directory due to permissions, it will fail.
3. Sonarr's Remote Path Mapping (Less Common for Deletion, but Relevant for Import)
The Problem: Sonarr needs to know how the path Transmission reports a file (e.g., /downloads/complete/Show.S01E01.mkv) translates to a path Sonarr can access within its own container (e.g., /downloads/complete/Show.S01E01.mkv). If this mapping is incorrect, Sonarr might not successfully "import" the file, and thus won't trigger the delete command.
How to Check/Fix:
In Sonarr: Settings -> Download Clients -> [Your Transmission Client]
Ensure the "Category" setting in Sonarr matches what you've configured Transmission to use (if anything).
Host: Enter the Host IP/Name that Sonarr uses to connect to Transmission (e.g., transmission if using Docker compose network, or the container's IP/host mapping).
Host Path: This is the path on the host machine where Transmission downloads files. Example: /path/to/your/downloads
Remote Path: This is the path inside the Transmission container where Transmission downloads files. Example: /downloads
Ideally, if Sonarr and Transmission are sharing the exact same host path mounted to the same container path (like in the example above), you might not need complex remote path mappings, or a simple mapping like:
Host: transmission (or its IP)
Host Path: /path/on/host/downloads
Remote Path: /downloads
This tells Sonarr: "When Transmission says it's at /downloads, know that it actually corresponds to /path/on/host/downloads on the host system."
4. Transmission Configuration:
The Problem: Although unlikely, Transmission itself might have settings preventing deletion.
How to Check:
Access your Transmission Web UI.
Go into Transmission's settings.
Ensure there isn't a strange setting preventing torrent removal or file deletion. Check its "Download Directory" setting – it should align with what you've mapped in Docker.
5. Sonarr Logs
The Problem: The logs will tell you exactly what Sonarr is trying to do and if it encounters errors.
How to Check:
In Sonarr, go to Activity -> History. Find the item that was imported. What status does it show? (Completed, Imported, Failed?).
Go to Settings -> Events or Logs. Look for entries related to Transmission around the time of the import. Search for keywords like "Transmission," "delete," "remove," "permission denied," or specific error messages.
Troubleshooting Steps Summary:
Verify Docker Volumes: Double-check your docker-compose.yml (or Docker run commands). Ensure the host path for downloads is identical for both Sonarr and Transmission, and mounted to the same container path (e.g., /downloads).
Check PUID/PGID: Make sure the PUID and PGID environment variables are set correctly for both containers and align with your host user's permissions for the download directory.
Review Remote Path Mapping: Ensure Sonarr's remote path mapping correctly translates Transmission's reported path to the host path.
Check Sonarr Logs: Look for specific error messages during the import or deletion phase.
Test Manually (Optional but helpful):
docker exec -it <transmission_container_name> ls /downloads - Can you see the downloaded files?
docker exec -it <transmission_container_name> rm /downloads/some_test_file.txt - Does Transmission have permission to delete? If this fails, it's a permission/volume issue.
The most common cause is definitely the volume mapping not being identical or permission issues stemming from incorrect PUID/PGID. Start there!