Corrupt or Quarantined? Diagnosing macOS “Unable to Expand Zip (Error 0)”

Development

You’re trying to decompress a ZIP file on your Mac—and just when you think you’re almost done, a cryptic error appears: “Unable to Expand Zip (Error 0)”. While ZIP archives are among the most universally supported compressed file formats, this surprisingly unhelpful error message from macOS leaves many users confused, frustrated, and unsure whether the problem lies in a corrupted file, incompatible software, or macOS’s own internal security mechanisms.

This article takes a thorough look at what causes this common macOS error, how to properly diagnose the problem, and what solutions you can employ to get your files unpacked safely.

What Does “Unable to Expand Zip (Error 0)” Mean?

When macOS’s built-in Archive Utility attempts to extract a ZIP archive but fails, you may get the default message: “Unable to expand zip file. Error 0 – Operation not permitted.” While it sounds straightforward, the message doesn’t explain the core issue. This error is really just a general alert—one that can be triggered by multiple causes.

Common Triggers Behind the Error

  • Corrupt Archive File: One of the most frequent reasons. This can occur during download, transfer, or due to improper compression.
  • File Quarantine: Files downloaded from the internet may be automatically tagged by macOS as potentially harmful.
  • Permission Issues: If you don’t have the right privileges for the destination folder, extraction will fail.
  • Unsupported Compression Method: ZIP files created with non-standard algorithms may not be compatible with macOS’s Archive Utility.
  • File Path Length: Excessively long directory and file names within the ZIP can also break the extraction process.

Step-by-Step Diagnostic Process

If you’re encountering this error and are unsure of its cause, the following methodical steps can help you isolate the issue.

1. Verify File Integrity

First, make sure the ZIP file is complete and hasn’t been corrupted:

  • Compare the file size to what’s listed online if the file was downloaded.
  • If you received the file via email or transfer service, ask the sender to re-upload it and use a checksum (e.g., SHA-256) to verify correctness.

A corrupted ZIP archive typically fails across multiple systems, so try extracting it on another computer, especially one not running macOS.

2. Check macOS Quarantine Flags

macOS applies a quarantine flag to files downloaded from the web, alerting Gatekeeper to inspect it more thoroughly. This can result in blocking the file’s contents from being extracted—even if it’s actually safe.

Run the following Terminal command to see if quarantine is applied:

xattr -l YourArchive.zip

If you see com.apple.quarantine in the output, that flag is active. You can remove the quarantine with:

xattr -d com.apple.quarantine YourArchive.zip

This clears the file’s restricted status and may allow you to unzip successfully afterwards.

3. Attempt Extraction Using Terminal

Sometimes, the GUI Archive Utility stumbles where command-line tools succeed. Try unzipping through Terminal:

unzip YourArchive.zip

If the CLI tool throws an error, it might reveal more specific information that helps identify the root cause. For instance, messages like “End-of-central-directory signature not found” indicate corruption.

4. Test File with Third-Party Utilities

Many advanced decompression tools handle scenarios macOS’s native extractor cannot. Consider using:

  • The Unarchiver: A free, robust alternative that supports more formats and error correction.
  • Keka: Another powerful macOS tool that handles broken archives better than Archive Utility.
  • BetterZip: A premium utility offering extensive diagnostics and repair options.

Quarantine or Corruption?

These two are the most likely culprits when facing Error 0. But how do you distinguish between them?

Signs the File is Quarantined

  • You downloaded it from a browser (especially Safari or Chrome).
  • com.apple.quarantine is present when inspecting metadata.
  • The file opens with third-party apps but not Archive Utility.

Signs the File is Corrupted

  • Even third-party utilities fail to extract it.
  • Error messages from unzip mention issues with file structure.
  • The file size is much smaller than expected.

Preventing Future Errors

Once you’ve resolved the problem, it’s advisable to implement best practices for handling ZIP archives to avoid such issues in the future.

For Senders

  • Use trusted, up-to-date compression software (like 7-Zip or WinRAR).
  • When emailing, avoid modifying the name or type of the file manually before sending.
  • Double-check compression success by testing the archive after creation.

For Receivers

  • Always download files using a stable internet connection.
  • Scan files for quarantine flags if they refuse to open normally.
  • Consider using third-party apps for problematic archives.

The Special Case of M1/M2 Macs

Apple’s shift to ARM-based Apple Silicon (M1, M2) introduced some architectural differences that can also affect ZIP handling. Although rare, some developers have reported odd behaviors in these systems, especially when relying on Intel-compiled software. Using universal apps or those updated for ARM can reduce compatibility issues.

When to Move On

Despite all efforts, you may find yourself still facing an intractable archive. Some files are simply lost to corruption, partially uploaded, or the result of bad compression software at the source. If all utilities and attempts prove unsuccessful:

  • Contact the file sender to provide a new copy.
  • Ask for a different format (.tar.gz, .7z) if possible.

Errors like “Unable to Expand Zip (Error 0)” are not always recoverable, but understanding their causes ensures you’re not wasting time on a fix that won’t work.

Conclusion

The next time macOS throws an “Unable to Expand Zip (Error 0)” your way, don’t panic. You’re not necessarily facing corruption—your operating system might just be overprotective of your safety. By carefully checking whether your file was downloaded from the internet, using command-line tools, and trying trusted third-party software, you can usually identify the true cause of the problem and extract your ZIP archive without issue.

Always remember: what looks like a corrupted file may just be sitting in quarantine. Diagnosing the difference is the key to quick resolution.