ADD menu option to empty selected torrent(s) data, leaving the torrent in a paused empty state #5984

Closed
opened 2026-02-21 18:09:42 -05:00 by deekerman · 2 comments
Owner

Originally created by @allanlaal on GitHub (Aug 26, 2017).

use case

I've added hundreds..thousands of torrents that I wish to download eventually and wish to delete the data of some of these to free up a few hundred GB of disk space.

  1. I choose a low-priority category and select all torrents that are less than 25% done there, maybe nitpicking a bit. I figure its not the end of the world if the data must be redownloaded one day.
  2. I right click and choose "Empty Data", "Reset storage" or similar option that is under the Delete option
  3. qBittorrent pauses these torrents, deletes all data and sets the progress back to 0%.

optional bonus feature: size and torrent contents directory listing information is kept

notes

this is not the same as deleting the torrent, which would result in the torrent being removed from qBittorrent (and the filesystem)

not the same, but linked to #4249 (the current ticket does not suggest deleting separate files and folders inside the torrent, but instead all of it)

Originally created by @allanlaal on GitHub (Aug 26, 2017). ## use case I've added hundreds..thousands of torrents that I wish to download eventually and wish to delete the data of some of these to free up a few hundred GB of disk space. 1. I choose a low-priority category and select all torrents that are less than 25% done there, maybe nitpicking a bit. I figure its not the end of the world if the data must be redownloaded one day. 2. I right click and choose "Empty Data", "Reset storage" or similar option that is under the Delete option 3. qBittorrent pauses these torrents, deletes all data and sets the progress back to 0%. optional bonus feature: size and torrent contents directory listing information is kept ## notes this is not the same as deleting the torrent, which would result in the torrent being removed from qBittorrent (and the filesystem) not the same, but linked to #4249 (the current ticket does not suggest deleting separate files and folders inside the torrent, but instead all of it)
deekerman 2026-02-21 18:09:42 -05:00
  • closed this issue
  • added the
    Duplicate
    label
Author
Owner

@allanlaal commented on GitHub (Aug 26, 2017):

temporary dirty workaround for Linux users:

  1. Choose torrents you want to empty from qBittorrent, pause them and then: right click -> copy names

  2. paste these files into ~/qBi.doBeDeleted.clean

  3. then run these in terminal (change /avv/dn/partial-2017-03-16 to your own partial download path escaping every / with ):

    cat ~/qBi.doBeDeleted.clean | sed -e 's/[^a-zA-Z0-9,._+@%/-]/\\&/g' > ~/qBi.doBeDeleted.escaped
    echo '#!/bin/bash' > ~/qBi.doBeDeleted.bash
    chmod +x ~/qBi.doBeDeleted.bash
    cat ~/qBi.doBeDeleted.escaped | sed 's/^/rm -rf \/avv\/dn\/partial-2017-03-16\//' >> ~/qBi.doBeDeleted.bash
    ~/qBi.doBeDeleted.bash
    
  4. watch -n1 'df -h /avv && df /avv'
    (it took me about ~1 hour for the first 900 deletes to finally reindex and show the correct free space, but the next 1000 only took a few minutes)

  5. qBittorrent -> same selection -> right click -> recheck

@allanlaal commented on GitHub (Aug 26, 2017): temporary dirty workaround for Linux users: 1. Choose torrents you want to empty from qBittorrent, pause them and then: right click -> copy names 2. paste these files into ~/qBi.doBeDeleted.clean 3. then run these in terminal (change \/avv\/dn\/partial-2017-03-16 to your own partial download path escaping every / with \): ``` cat ~/qBi.doBeDeleted.clean | sed -e 's/[^a-zA-Z0-9,._+@%/-]/\\&/g' > ~/qBi.doBeDeleted.escaped echo '#!/bin/bash' > ~/qBi.doBeDeleted.bash chmod +x ~/qBi.doBeDeleted.bash cat ~/qBi.doBeDeleted.escaped | sed 's/^/rm -rf \/avv\/dn\/partial-2017-03-16\//' >> ~/qBi.doBeDeleted.bash ~/qBi.doBeDeleted.bash ``` 4. watch -n1 'df -h /avv && df /avv' (it took me about ~1 hour for the first 900 deletes to finally reindex and show the correct free space, but the next 1000 only took a few minutes) 5. qBittorrent -> same selection -> right click -> recheck
Author
Owner

@thalieht commented on GitHub (Sep 25, 2018):

Duplicate of #4664

@thalieht commented on GitHub (Sep 25, 2018): Duplicate of #4664
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#5984
No description provided.