rsync --delete src/ dst/

Category: File Operations

rsync --delete src/ dst/

Sync and delete files in destination not in source

Syncs and also removes files from the destination that no longer exist in the source — makes the destination an exact mirror.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.