If you followed my guide for setting up your server, then you are using Deluge for your torrent client. We wired everything up so your downloads get automatically imported and organized in your storage location, but one question that came up often was why two copies ultimately were left on your computer. The answer is that although your file was renamed and stashed away, Deluge hung on to an original copy so that it could continue seeding it. As long as you occasionally checked in and deleted all the old torrents you would be fine, but this was the one thing that held the process back from being completely automated. This post will walk you through how to set up a plugin in Deluge that will handle this maintenance for you.
Before we begin
I want to reiterate that if you are using torrents in your setup, you should really be using a VPN to protect your IP address from prying eyes. Read more about how and why to do that here.
Setting up the plugin
We will be using a plugin called AutoRemovePlus. Begin by download it from this forum post. You will want the py2.6 version.
Now open up Deluge, either through the local client or the web interface if you're on a different computer. Open the Preferences and select the Plugins section.
Click the Install Plugin button and open the .egg file that you just downloaded. Enable it with the check mark if it isn't already enabled.
Enabling the plugin should've added an AutoRemovePlus section to your Preferences window, select it.
Change Check every to 0.1000. This will cause the plugin to check your torrents about every 2 and a half hours and delete any that meet the criteria.
Change Maximum Torrents to the number of torrents you want to leave seeding at any one time. If you want the torrents to clear out as quickly as possible, set it to 0.
Change Remove by to Seed Time and set the value to 0.166. This is measured in days, so this setting will clear out torrents that have been seeding for 4 hours. You don't want to set this to 0, because that runs the risk of removing torrents before your server has the chance of importing the data.
For Exempted Trackers, add any trackers that you don't want to auto-remove. Private trackers often require you to maintain a certain ratio, so you will want to leave those seeding for as long as possible. In my example above, I have empirehost.me, ipt.af, and iptorrents.com, which are three trackers that IP Torrents uses.
Press OK and you're done.