-1

Command like this:

rm -rf ~/.local/share/Trash/*

doesn't remove all files from trash, are there any other path to trash files?

Updated:

simply files from other drive store into other folder.

VelikiiNehochuha
  • 3,775
  • 2
  • 15
  • 32
  • Could you move you "Update" to an answer instead and mark the question as resolved? – Harald Nordgren Mar 24 '19 at 18:10
  • Yep, but I've got "You can accept your own answer tomorrow", so I can do it tomorrow. – VelikiiNehochuha Mar 24 '19 at 19:09
  • 1
    You could also call the empty trash method via DBus: `dbus-send --session --print-reply --dest=org.xfce.FileManager /org/xfce/FileManager org.xfce.Trash.EmptyTrash string:":0.0" string:""`. The only downside is that it will show a confirmation dialog. – AndreLDM Apr 02 '19 at 14:23

2 Answers2

1

If files from second drive, trash files store on that drive, for example you can have

/run/media/<username>/<uuid>/.Trash-1000/files/*

only files deleted from home folder store into:

~/.local/share/.Trash

So it was done to avoid copy files from another driver to local trash.

VelikiiNehochuha
  • 3,775
  • 2
  • 15
  • 32
-1

As mentioned here: https://askubuntu.com/questions/327943/how-to-open-trash-through-terminal

(⬆️ also older command-line suggestion)

Gnome Virtual File System (GVFS) is involved in the Trash management, so the following command may help about managing Trash from command line, so emptying.

XFCE docs bellow confirms that the Trash is managed by gvfs related packages.

https://docs.xfce.org/xfce/thunar/unix-filesystem

So, on recent distribution gio command will be your savior:

(Here, I tested it under XFCE 4.16 under xubuntu 22.04)

get the list of Trashed files:

gio list trash://

delete all them!

gio trash --empty
Sylvain
  • 336
  • 2
  • 7