52

Is there a safe way of deleting contents of ~/.local/share/Trash/expunged ? I see It has lots of files & folders I had deleted -- from the trash as well. They are taking a lot of disc space.

After deleting the files & clearing the trash why are the files still there ?

I haven't tried it yet but is it ok to manually delete them ?

  sudo rm -rv ~/.local/share/Trash/expunged
maan81
  • 605
  • 1
  • 6
  • 22

1 Answers1

65

Files can be stuck in ~/.local/share/Trash/expunged when you delete from Nautilus a folder that belongs to you, but contains files which are belong to another user, and it is tricky for Nautilus to handle this situation correctly. To delete them try to use:

sudo -i
rm -rv /home/<your_username>/.local/share/Trash/expunged/*
exit
Radu Rădeanu
  • 166,822
  • 48
  • 327
  • 400
  • Oh, thanks so much. I got 6gb extra free space after deleting those files. – Sigur Dec 28 '22 at 13:02
  • I found more info about the ”expunged“ directory: When a directory hierarchy is ”deleted“ in nautilus, it gets moved to the `$trash/files` directory. When the trash gets emptied, that hierarchy is first moved to `$trash/expunged` (because moving files is fast), and then slowly deleted from there (slowly because deleting a lot of files takes time and doing it too fast could slow down the whole computer). [Source](https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/422012). — btw, there's a related GNOME [gitlab issue](https://gitlab.gnome.org/GNOME/glib/-/issues/1665). – myrdd Jun 11 '23 at 17:31