The operation can’t be completed

macOS 'The operation can’t be completed' fix on external drives

You get this error trying to delete files on an external drive. It’s usually a permissions or disk structure issue. Here’s the real fix.

Quick answer for pros

Run sudo rm -rf /Volumes/DriveName/path/to/file in Terminal. If that fails, use diskutil repairVolume /Volumes/DriveName or fsck_exfat -d /dev/disk2s1 for ExFAT drives.

Why this happens

What's actually happening here is that macOS’s Finder is hitting a wall it can’t explain. The error “The operation can’t be completed” is a catch-all for three underlying causes:

  • File permissions or ACLs — the external drive might be formatted as ExFAT or FAT32, which doesn’t support macOS permission flags, but macOS still tries to apply them. This creates confusion.
  • Locked files or hidden flags — the file might have the uchg (user immutable) flag set. Finder won’t tell you this, but it blocks deletion.
  • Corrupted directory structure — especially on older drives, a sudden disconnect or improper ejection can leave the volume’s file table in a state where macOS can’t resolve the file’s location.

The reason a simple restart sometimes works is that macOS’s fsck runs automatically at boot on internal drives, but not on externals. So you have to force it.

Fix steps (in order of likelihood)

  1. Try the Terminal brute-force
    Open Terminal and type:
    sudo rm -rf /Volumes/DriveName/path/to/file
    Replace DriveName and the path with your drive and the stuck file. If the file name has spaces, wrap it in quotes: sudo rm -rf "/Volumes/My Drive/stupid file.pdf". This bypasses Finder’s permission checks entirely.
  2. Check for the immutable flag
    If step 1 fails with “Operation not permitted,” the file might be locked:
    ls -lO /Volumes/DriveName/path/to/file
    Look for uchg in the output. If you see it, run:
    sudo chflags nouchg /Volumes/DriveName/path/to/file
    Then retry step 1.
  3. Repair the volume
    Open Disk Utility, select the external drive, click First Aid → Run. Or use Terminal:
    diskutil verifyVolume /Volumes/DriveName
    If it reports issues, run:
    diskutil repairVolume /Volumes/DriveName
    For ExFAT drives, skip Disk Utility — it’s flaky with ExFAT. Use fsck_exfat instead:
    sudo fsck_exfat -d /dev/disk2s1
    You’ll need to find the correct disk identifier first with diskutil list. Pick the one that matches your external drive size.
  4. Force unmount and remount
    If the volume repair says “volume is in use,” unmount it first:
    sudo umount /Volumes/DriveName
    Then repair it, and remount by plugging it out and back in.
  5. Eject from terminal, then delete
    Sometimes the file’s directory entry is cached. Eject cleanly:
    sudo diskutil eject /Volumes/DriveName
    Then reconnect and retry step 1.

If all else fails

Copy everything off, reformat, copy back. It’s nuclear but works every time. Use Disk Utility to erase the drive as ExFAT (if you need cross-platform) or APFS (if macOS only). Before you do, check if the file is actually needed — sometimes it’s a phantom entry you can just ignore.

Use a third-party tool like DiskWarrior or TechTool Pro for deeply corrupted directory structures. They cost money but they’ve saved my ass more than once on drives that even fsck couldn’t fix.

Prevention

Always eject external drives properly — don’t just yank them. I know, it’s obvious, but the one time you’re in a hurry is when the file table gets scrambled. Also, run diskutil verifyVolume monthly on drives you use heavily. If you’re on macOS Ventura or later, enable “Erase External Media” in Finder’s sidebar to get a clean eject shortcut.

And for god’s sake, don’t copy files directly from a Windows machine to ExFAT without a proper disconnect — Windows often leaves files in a “dirty” state that macOS chokes on.

Related Errors in macOS Errors
Safari stuck in redirect loop on Mac? Here's the fix null macOS 'The operation can’t be completed because the original item for ‘filename’ can’t be found' fix Operation not permitted Fix macOS 'Operation not permitted' Terminal Error in Minutes Fix Apple Silicon Kernel Panic Loop in macOS

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.