For the purpose of this question, "large directory" means for example a Linux kernel git repository, or the Chromium source.
If I rm -rf
a large directory like this from the shell, it is deleted in only a couple of seconds at most.
If I move it to trash first and then empty the trash, the first operation takes under a second, then the actual delete takes several minutes (we are talking double figures.)
Why is emptying the trash so slow? What is it doing when it says "preparing." How much preparation does it actually take to run rm -rf ~/.local/share/Trash/
?
libnautilus-private/nautilus-file-operations.c
in the source (apt-get source nautilus
). I don't have the diligence and patience for reading C. Interesting question though. +1rm -rf ~/.local/share/Trash
might be faster. See askubuntu.com/a/468722/2273