Delete files directly without going to Trash in Google Drive

What is the problem you are having with rclone?

I mounted my Google drive and stream media files from plex. When I delete files in plex, it would be deleted in my Gdrive as well. But after taking a look, it actually went to the Trash folder in Gdrive, so I'll also have to delete those files in Trash again to release the storage space

When I finish a movie, I usually remove it from plex app. How can I set up to delete files directly without going to Trash folder ?

Run the command 'rclone version' and share the full output of the command.

rclone v1.64.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.15.0-1045-oracle (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.21.1
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

No particular command

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =

[gdtest]
type = crypt
remote = gdrive:test
password = XXX

A log from the command that you were trying to run with the -vv flag

No particular command

All explained below:

Use --drive-use-trash flag to control what happens with deleted files.

Hey, thanks for replying

I normally delete media files in Plex or Radarr. Is --drive-use-trash a command line I need to use in Putty ?

You have two options:

  1. in command line, e.g.::

rclone rmdir something --drive-use-trash=false

  1. Or as a part of your config:
[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
use_trash = false

I am guessing option (2) will do what you described.

EDIT - mistake:) it should be false not true

Yes! I want to enable this as a system wide config, so whenever rclone sense a 'delete operation', it will directly remove the file from google drive. This way I can delete things in different apps straight away

How do I add --drive-use-trash=false into my rclone config like you suggested above ?

read my previous post - all is there

I understand using that in putty as your first method, but don't know how to set up in rclone config though

So things like

client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =

These are set up step by step when I create a new remote. How is use_trash = false being added to my profile ?

Just open rclone.conf file in your fav text editor and add it by hand.

You can run:

rclone config file

to find out where rclone.conf is.

Other option is to run rclone config and edit existing remote. use_trash is probably somewhere in advanced settings.

Use text editor - much easier:)

I just edited the rclone.conf file, and it's working. Now all deleted files do not occupy the Trash folder anymore. Thank you for guiding me through this !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.