Transmission: Get rid of old never removed files

filestransmission

I've been using transmission to download various torrents, but every now and then transmission does not remove the file but removes the torrent file.

This makes it that my download folder is full of already removed torrents, but the files are still there.

What is the best way to find which files are currently not linked to any loaded torrent and remove them?

Thanks for your time!

Best Answer

You can ask transmission-remote for a list of the files it knows about. There are two options for asking for files, --files and --info-files/-if; which you need probably depends on the version you're running:

$ transmission-remote «host» -N ~/.transmission-netrc -t all --files    # or -if
musopen-lossless-dvd (4 files):
  #  Done Priority Get      Size  Name
  0: 100% Normal   Yes   8.07 GB  musopen-lossless-dvd/Musopen-Lossless-DVD.zip
⋮

Unfortunately, it's intended for display, not parsing, and there doesn't seem to be an option to make scripting-friendly output. If you're a programmer, you could grab the source and fix that or alternatively hack together your own implementation in Perl/Python/Ruby/JavaScript/etc. to get the file names. Transmission uses a documented, fairly simple JSON-over-HTTP protocol.

You could also try --move to ask Transmission to move everything it knows about to a new directory.

Related Question