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/*

4
  • Possible duplicate of How can I empty the trash using terminal?
    – Raffa
    Aug 4, 2019 at 22:44
  • NOT DUPLICATE. See edited question.
    – Stepan
    Aug 4, 2019 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 4, 2019 at 23:09
  • Are any of the files owned by other than you? Please try: sudo rm -rf ~/.local/share/Trash/files/*
    – chili555
    Aug 4, 2019 at 23:42

2 Answers 2

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/.??*
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.

1
  • This is not normal, deleting 10 000 small files should only take a few seconds.
    – Arnaud
    Sep 23, 2020 at 9:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .