Delete local without transferring new?

What is the problem you are having with rclone?

I'm curious if there's a way, without transferring new data, to delete from the originating remote the data that already exists on destination

I sync data to a remote via rclone copy. I sometimes am in need of space and what I would like to do is delete data on the originating remote that already exists on the destination.

Is this possible? If it's not built in, is it something that can be done via a script? There's probably something I'm missing, but I'm honestly blanking.

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

rclone v1.61.1

  • os/version: unknown
  • os/kernel: 4.4.180+ (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: none

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

Google drive as destination. Local, dropbox, s3 and others for source.

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

Not related to a command.

That is essentially what rclone move does. It does an rclone copy then deletes data on the source.

So what you could do is to an rclone move with a filter, say --min-age 30d to move all the files older than 30 days to the remote. You'd then follow this up with an rclone copy to sync the newer files.

Or you could do the rclone copy source: dest: first as you've been doing then do an rclone delete source: --min-age 30d to delete all files older than 30 days.

If you try any of these use the -i flag to test them interactively. Then test with --dry-run and look at the log, and only then do it for real (data loss sucks!).

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