Skip to content

--delete does not work with --files-from #533

Description

@eharris

When using --delete with --files-from, files that already exist in the destination that are not included in the transfer are not deleted as expected.

To reproduce:

> mkdir test
> touch test/test
> mkdir test2
> touch test2/test2
> echo test > list
> rsync -av --delete --files-from=list test/ test2/
building file list ... done
test

sent 114 bytes  received 35 bytes  298.00 bytes/sec
total size is 0  speedup is 0.00
> ls test2
test  test2
>

As can be seen in this example, the test2 file still remains in the destination directory even though it was not given in --files-from and was not part of the transfer.

Also tried adding both --delete-excluded and -r, and even with these --delete still seems to have no effect.

rsync 3.2.7 on Debian 11 amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions