2

I deleted several thousands of large files at once with total volume of 500Gb. They ended up in a trash bin (I thought I was using shift-delete, but apparently it was just moved to recycling bin. When I choose "empty recycling bin" it freezes.

i@my_comp:~/.local/share/Trash/files$ ls
i@my_comp:~/.local/share/Trash/files$ 

Hence, suggested rm -rf * from inside ~/.local/share/Trash/files Deleted files still appear in recycling bin.


This question IS NOT a duplicate because FILES REMAIN in trash AFTER rm -rf ~/.local/share/Trash/*

Stepan
  • 338

2 Answers2

3

Option #1:

You can try the command-line utility trash-cli, to use it to empty the trash from the command-line:

  1. Install the package, run the following in the terminal:

    sudo apt install trash-cli

  2. Empty trash, run the following in the terminal:

    trash-empty

This is the equivalent to empty trash in the GUI but it works by itself and does not rely on the GUI.

Option #2:

Please check if there are hidden files in the Trash directory, to do so run the following command in the terminal:

ls -la ~/.local/share/Trash/

Hidden files start with . like .filename. If there are hidden files, you can run the following command in the terminal to delete them:

rm -rfv ~/.local/share/Trash/.??*
Raffa
  • 32,237
2

The problem was caused by 10000 of small (4Kb) files. Empty trash was working, but slowly. I thought process hung and started it over again. I left it overnight and the bin was clean.

Stepan
  • 338
  • This is not normal, deleting 10 000 small files should only take a few seconds. – Arnaud Sep 23 '20 at 09:05
  • I my case these files also were originated from a different mounted device, so maybe this was one of the factors of slowness. trash-empty command helped – HydraOrc Mar 13 '24 at 14:38