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
  • 328
  • 3
  • 11
  • Possible duplicate of [How can I empty the trash using terminal?](https://askubuntu.com/questions/468721/how-can-i-empty-the-trash-using-terminal) – Raffa Aug 04 '19 at 22:44
  • NOT DUPLICATE. See edited question. – Stepan Aug 04 '19 at 22:59
  • What output do you get for `rm -rf ~/.local/share/Trash/*` and what output for `ls -l ~/.local/share/Trash/`. Please edit your question and update with the output. – Raffa Aug 04 '19 at 23:09
  • Are any of the files owned by other than you? Please try: `sudo rm -rf ~/.local/share/Trash/files/*` – chili555 Aug 04 '19 at 23:42

2 Answers2

2

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
  • 24,905
  • 3
  • 35
  • 79
1

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
  • 328
  • 3
  • 11