andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.62k stars 177 forks source link

Slow trash-empty taking hours to delete #321

Closed aminya closed 11 months ago

aminya commented 11 months ago

Describe the bug When I use trash-empty, it takes hours to delete the files in my Trash directory on Linux. Because of that I manually use sudo rm -rf ~/.local/share/Trash/files/*, which does it way faster. Why is trash-empty much slower than trash-empty?

trash-cli version

/usr/bin/trash-empty 0.17.1.14

Are you using the latest version of trash-cli? Yes

Have you tried if the bug is present in the latest version of trash-cli? Yes

Please, install the latest version of trash-cli and try again before submitting the bug

First of all you need to uninstall any previous version of trash-cli::

$ [sudo] pip uninstall trash-cli # remove the previous version (with pip)
$ [sudo] apt-get remove trash-cli # remove the previous version (with apt)
$ [sudo] yum uninstall trash-cli # remove the previous version (with yum)
$ ... # refer to the package manager of your distribution

Then install the latest version from git::

$ pip install pip install git+https://github.com/andreafrancia/trash-cli

Have done that? Then continue with the bug report. Yes, tried with pip based version. Still a slow performance.

Operating system:

Kubuntu 22.04

To Reproduce Copy and paste the commands (and their output) to execute in order to reproduce the behavior:

> trash-empty --verbose
Would empty the following trash directories:
    - /home/aminya/.local/share/Trash
    - /media/aminya/Linux/.Trash-1000
Proceed? (y/n) y
removing /home/aminya/.local/share/Trash/files/tests-urdf_tests.runfiles_1

Note that these runtime folders include a lot of symlink files (generated by Bazel).

image

Expected behavior

Faster performance or a progress report on what is happening when running trash-empty

Volumes detail If your issue is related to recognition of volumes, please provide the output of: trash-list --debug-volumes

andreafrancia commented 11 months ago

Please install the latest version of trash-cli before submitting an issue. And provide some numerical indication on how trash-empty is slower in respect of rm.