Finder fixes and how-tos
Archive Utility's error number is usually a Unix error code, and the words after it say what went wrong. The table below decodes 1, 2, 79 and 94, a later section covers 640 and 4097, and two Terminal checks name the real problem.
Archive Utility's message reads Unable to expand “X” into “Y”. (Error N - description.). For the numbers people see most, N is a standard Unix error code, so the description after it is the real clue:
| Error | Description | What it usually points to |
|---|---|---|
| 79 | Inappropriate file type or format | The file isn't a zip at all, whatever its name says |
| 94 | Bad message | The archive's data is damaged or cut short |
| 1 | Operation not permitted | macOS blocked the write, often at the destination folder |
| 2 | No such file or directory | Part of the archive, or of the place it was writing to, wasn't there |
Fastest fix: download or copy the file again and double-click the new copy. If that fails too, the Terminal checks below say what's wrong in plain words. A different message, It is in an unsupported format., means Archive Utility didn't recognise the file as any archive it handles; the file check below tells you what it is. Errors 640 and 4097 aren't Unix codes and have their own section.
A "zip" that fails with error 79 is often a web page or an error message saved with a .zip name, because a download link expired or needed a login. The file command reads the contents, not the name:
file ~/Downloads/archive.zip
A real archive says Zip archive data. A small HTML file renamed to .zip for this guide came back as HTML document text. If yours says that, or it's only a few kilobytes, it was never an archive: go back to the source and download it again, signed in if the site needs it.
file only reads the start of a file, so it can't tell you an archive is cut short. A zip truncated after 60 bytes still showed up as Zip archive data. To test the whole archive:
unzip -t ~/Downloads/archive.zip
A good archive ends with No errors detected in compressed data. One that was cut off stops with End-of-central-directory signature not found: a zip writes its index at the very end, so a download that stopped early has none. Damage in the middle looks different, a bad CRC line against each broken file and then At least one error was detected.
If unzip -t can't find the end of the archive, the usual story is a download that didn't finish, a copy from a drive that was unplugged part way, or an attachment that was cut off. Compare the size in File > Get Info with the size the source lists, if it gives one. Download it again and wait until the browser says it's done before you open it. If you're not sure where downloads land, finding your Downloads folder covers that.
Apple's advice for a zip that won't open is the same idea: make sure there's enough free space for the unzipped contents, and if someone sent you the file, ask them to zip it again and resend it.
Files named archive.z01 or archive.zip.001 are slices of one archive, and unzip -t on a single slice typically stops with the end-of-archive message above, which itself mentions multi-part archives. The file types Archive Utility declares on macOS 15.6 don't include split zip parts, so put every part in one folder and use the tool that made them, or ask the sender for a single zip.
Archive Utility expands into the folder the zip is in. Error 1 (Operation not permitted) means macOS blocked the write. ditto, Terminal's archive tool, uses the same Apple archive framework as Archive Utility, so it was pointed at three folders for this guide: a folder locked in Get Info and a protected system folder both gave Operation not permitted, while a folder that was only read-only gave Permission denied. So look at the folder holding the zip: locked, on a network share, or somewhere you can't normally save. Copy the zip to your Desktop and open it there.
Error 2 (No such file or directory) is vaguer. In the same tests, ditto printed that message, followed by Couldn't read pkzip signature, for a zip cut off halfway, so treat it as a damaged or incomplete archive first and download it again.
To extract into a folder you own and read the messages yourself:
mkdir ~/Desktop/unzipped
ditto -x -k ~/Downloads/archive.zip ~/Desktop/unzipped
-x -k tells ditto to extract a PKZip archive. The renamed HTML file gave Couldn't read PKZip signature, the 60-byte one Couldn't read pkzip local header. One limit: ditto extracted a zip with damaged data without a word of complaint, so a clean ditto run doesn't prove the files inside are intact. unzip -t is the check for that.
A zip that asks for a password is a different problem; the password guide covers it.
Unix error numbers on macOS stop a little above 100, so 640 and 4097 come from somewhere else. They match two codes in Apple's Foundation framework, which Mac apps use to report file errors: 640 is a write that failed because the disk ran out of space, and 4097 is a lost connection to a helper process. Archive Utility does its expanding in a helper of that kind, AUHelperService. Apple doesn't document Archive Utility's codes, so take this as a lead, not a diagnosis:
unzip -t and ditto -x -k as above; neither goes through Archive Utility.If you've downloaded the archive more than once, one copy may be complete. In Everywhere, type a word from its name plus .zip and sort by Largest: a full download sits above the ones that stopped early, and the folder under each result tells you where it is. If the zip did expand once, the same word without .zip finds the folder it made. Downloads, Desktop and Documents are only searched once Everywhere has Full Disk Access.
It is the Unix code for an inappropriate file type or format: the file isn't a valid zip, often a web page saved with a .zip name. Run file on it in Terminal to see what it really is, then download it again.
Error 94 is Bad message, which in practice means the archive's data is damaged or incomplete. Run unzip -t on it to confirm, then download or copy the file again.
macOS blocked the write, often because the folder the zip is in is locked, protected or on a share you can't write to. Copy the zip to your Desktop and open it there, or extract it with ditto -x -k into a folder you own.
Neither is a Unix code. They match Apple's Foundation codes for a disk that ran out of space (640) and an interrupted helper process (4097). Check free space for 640; for 4097, retry, then test the file with unzip -t.
Everywhere keeps track of every file on your Mac, including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised