Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I killed a local "rsync -ah" process.
It left junk files like ".abc.vmdk.zxivMN" in the target directory.
The junk files do not get deleted on consecutive "rsync -ah" runs.

I ran diff on both folders I was syncing and it reported: "Only in /mnt/archive1/documents/general: .abc.vmdk.zxivMN"

What is the best way to clean up the temporary rsync files ?

share|improve this question
up vote 10 down vote accepted

Tell rsync to delete files not on the source, with --delete-during or --delete-after. Be careful and use this option only if you don't have legitimate files on the target that aren't there on the source.

See man rsync.

Of course, you could always manually delete the files you detected with diff...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.