Emptying trash via terminal

I would like to be able to empty my trash in an ssh session. Possible?

Hi @alex.hasko

Yes it’s possible if the machine you are SSH’ing into has odrive installed. There is a CLI which is currently included with our Mac and Windows desktop clients, and if you are accessing a Linux machine (or just want a pure CLI on Windows or Mac) you can install the sync agent instead of the full desktop sync client.

Here’s links to our documentation on the Agent and CLI.

Here’s a link to a medium article with some additional information. (Notice there is an emptytrash command)


I’ve been w/ odrive since 2015 and I am impressed with the consistent improvement. I am surprised I didn’t know about this before; a great resource to have.

I would like to either setup an alias to the .py file or add the directory to my path, but it seems that with the constantly changing version numbers that will regularly break. Am I missing something (or is there a workaround?)

I guess one obvious approach is just to move it onto my path somewhere and only update it when I feel the need

1 Like

Hi @alex.hakso,
Yes that is one way to do it.

You can also use something like this to account for the dynamic path:
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py

1 Like

I guess those directories are predictable enough that that works. Great, thanks Tony