How do I delete a list of files from Google photos?

I am trying to sanitise my uploaded files to Google Photos after doing a local dedupe, and of course I find that Google have their special renaming scheme (which is documented in rclone docs). So, it will not let me delete qjuite a lot of duplicate photos using sync with INVALID ARGUMENT.

To work around this manually I have done an lsf and then grep-ed out all the files with brackets to create a list in a file.


rclone -n -v delete --include-from ~/photos-delete.txt -P gphotos:

where the lines in photo-delete.txt have been prefixed with "/album/" - and without too - shows me no attempted deletions. I have not yet dared remove the -n

Am I misunderstanding how this should work?

(My aim is to delete all the special renames and then sync with --delete-before to clear up a bit more)

You can feed this file straight back into rclone with --files-from using the same remote:path you used.

I would use rclone ls --files-from first to check you got the right files then you can use rclone delete --files-from

1 Like

Ah! I saw that option but the help text talked of "source" files - not destination, which confused me

1 Like

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