Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

What `rsync -avz –delete` Actually Does

`rsync -avz --delete` transfers files in archive mode, compresses data sent, and can remove destination-only files within synchronized directories. Preview with `--dry-run` first.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

rsync -avz --delete SOURCE DEST synchronizes files from the sending path to the receiving path, compresses data sent during transfer, and removes destination-side files that are absent from the source within directories being synchronized. Because --delete can erase files, confirm the direction and preview the proposed changes with --dry-run before running it for real.

What the command does

Rsync compares a sending path with a receiving path and transfers the changes needed to bring the receiving side into line with the sending side. Either path can be remote. In this command, SOURCE is the sender and DEST is the receiver; --delete applies to the receiver, not the source. It does not mean “delete source files after copying.”

The official rsync manual warns: “This option can be dangerous if used incorrectly!” Destination-only files in synchronized directories may be removed.

What each option means

  • -a / --archive: Enables archive mode, equivalent to -rlptgoD. This includes recursive transfer, copying symlinks as symlinks, and preserving permissions, modification times, group, owner, and device/special-file handling. Some preservation depends on platform capabilities and permissions.
  • -v / --verbose: Prints more information. One -v reports transferred files and a brief summary; adding more -v options increases detail.
  • -z / --compress: Compresses file data sent to the destination. This can reduce transmitted data, particularly over a slow connection. Available and negotiated compression methods depend on the rsync builds at both ends; rsync --version shows methods compiled into the local build.
  • --delete: Removes extraneous items from the receiving side when they are absent from the sending side, but only within directories whose contents are being synchronized.

What archive mode does not preserve by itself

Despite its name, archive mode does not cover every metadata type. It does not imply preservation of ACLs (-A), extended attributes (-X), access times (-U), creation times (-N), or hard links (-H). Add the relevant options only if those metadata types matter for your use case, and check that both systems and your permissions support them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

What --delete can remove—and what affects its scope

The option does not make every file on the destination eligible for deletion. Deletion is limited to the receiving-side contents of directories being synchronized, and several details affect which directories and files are in scope:

  • Paths and direction: Rsync treats one path as the sender and the other as the receiver. Reversing the paths reverses which side is at risk from --delete.
  • Directory transfer and recursion: Deletion requires recursive or directory-transfer behavior. Archive mode normally implies recursion.
  • Wildcards: A shell-expanded path such as source/* supplies individual paths rather than the parent directory as one complete synchronized directory. That changes the destination contents included in deletion scope.
  • Filters: Excluded files are normally protected from deletion. --delete-excluded or filter modifiers can change that behavior.
  • Sender errors: If the sender detects I/O errors, rsync disables destination deletion by default unless --ignore-errors is used.

Deletion timing also depends on the peer version when no timing mode is specified: the current manual says rsync uses --delete-during with peers at version 3.0.0 or newer and --delete-before with older peers. Other documented timing choices include --delete-delay and --delete-after.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Preview the operation before deleting anything

  1. Check which path is the source and which is the destination. Remember that --delete removes items from the receiving side, not the sending side.
  2. Run the intended command with the same paths and options, adding --dry-run (or -n), for example: rsync -avz --delete --dry-run SOURCE DEST.
  3. Inspect the proposed transfers and deletions. Confirm that every destination-only item shown for removal is meant to go.
  4. Only then run the command without --dry-run.

Keep the paths, wildcard behavior, and filters identical between the preview and the real run; changing them can change the deletion scope.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version and compatibility notes

The rsync project lists version 3.5.1 as released on September 21, 2026; see the rsync project site. Option meanings are documented in the manual, but compression behavior depends on the builds at both ends, and deletion timing can depend on the peer version as described above. Check the installed versions and capabilities when behavior differs between systems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.