A zip file that turns into a .cpgz file on a Mac
You double-click a .zip, and instead of a folder you get a file ending in .cpgz. Double-click that, and a .zip appears. Double-click the zip, and there is another .cpgz. The loop never produces your files, because Archive Utility could not read the zip in the first place, and the .cpgz is its confused attempt to do something with it anyway.
The cause is almost always one of three things: the download or copy stopped early, the file is not really a zip, or it uses a compression or encryption method Archive Utility does not handle. Each has a different fix, and you can tell which one you have in a couple of minutes.
What the .cpgz actually is
A .cpgz file is a different kind of archive: cpio, an old Unix format, compressed with gzip. Archive Utility can make and open these, and when it is handed a zip it cannot expand, it ends up wrapping the file into a new archive instead of unpacking it. So the .cpgz holds your zip, not your files. Expanding the .cpgz gives you the zip back, which fails the same way, which makes another .cpgz.
Two practical consequences. First, the .cpgz files are clutter: each is a wrapped copy of the zip you already have, so once you have confirmed the original zip is still there, they can all go to the Trash. Second, double-clicking again will never help, because the zip has not changed and Archive Utility reaches the same conclusion every time.
Step 1: check whether the zip is complete
A truncated file is the most common cause by a distance. A stalled download or a copy from a drive unplugged too soon leaves a zip whose first part is fine and whose end is missing. The end matters more than you would think, because a zip keeps its table of contents, called the central directory, at the very end of the file. Without it, Archive Utility does not know where anything is.
- Select the zip in the Finder and press Command-I.
- Compare the size with what the download page or the sender said it should be.
If the page promised 2.4 GB and Get Info shows 900 MB, you have your answer. The rest of the archive is not on your Mac, and no tool can conjure it. Download it again, on a steady connection, and let it finish before opening it. A file that still ends in .download or .part was never finished at all; a downloaded file that stays a .part or .download covers that case.
If the sender gave you a checksum, verifying a file arrived intact shows how to check it in Terminal. It settles the question in seconds.
Step 2: check that it is a zip at all
Some downloads arrive with a .zip extension but hold something else entirely. A link that needed a sign-in, or one that had expired, often hands back a web page instead of the file, and the browser saves it under the name you expected.
Open Terminal (in Applications, then Utilities), type file followed by a space, drag the zip onto the window, and press Return:
file ~/Downloads/project-files.zip
- “Zip archive data” means it is a genuine zip. Go on to Step 3.
- “HTML document” means you downloaded an error or sign-in page. The size will usually give it away too: a few kilobytes where you expected megabytes. Go back to the link and download again.
- “RAR archive data” or “7-zip archive data” means the extension is wrong. The Finder cannot open those formats; RAR, 7z and tar.gz archives on a Mac explains your options.
Step 3: ask unzip what is wrong
Archive Utility tells you nothing useful. The unzip command that ships with macOS is far more talkative, and it can test an archive without extracting anything:
unzip -t ~/Downloads/project-files.zip
Read the first few lines of the output:
- “End-of-central-directory signature not found” means the table of contents is missing, which confirms a truncated file. Even so,
unzipcan often read the files stored before the break. - “unsupported compression method” followed by a number means the archive was made with a compression method that Archive Utility and
unzipdo not support. Some archiving tools use newer methods, particularly for very large files. The data is probably fine; the Mac just cannot decompress it. Ask the sender to re-create the archive with standard compression, or to split it into several smaller zips. - The same message with the number 99 is a special case: it means the archive is encrypted with a method
unzipcannot handle, rather than compressed differently. The sender will need to use a different kind of protection, or share the files another way. - A list of files marked OK, with errors only at the end, means most of the archive is intact.
Step 4: pull out whatever survived
If the zip is truncated and you cannot get another copy, extract what is there rather than giving up on the lot. Files in a zip are stored one after another, so everything before the break is usually intact.
mkdir ~/Desktop/recovered
cd ~/Desktop/recovered
unzip ~/Downloads/project-files.zip
unzip extracts each file it can read and prints a warning for each one it cannot. If it refuses to start at all, ditto, another built-in command, reads zips with a different implementation and is worth one attempt:
ditto -x -k ~/Downloads/project-files.zip ~/Desktop/recovered
How to fix a corrupted ZIP archive on a Mac goes further, including rebuilding a missing table of contents with zip -FF.
Letting Manatee do the repair
If you would rather not work in Terminal, Manatee repairs zip files in its Repair mode. Drag the zip onto the menu bar icon or into the window, or right-click it in the Finder and choose Services, then Fix with Manatee. It reads the archive entry by entry, keeps every file whose contents check out, and writes a new zip next to the original. The original is never touched, so there is nothing to lose by trying.
The result is reported plainly. Fixed means every file came through. Partial means some did, and the report says how much came back. Not fixable means nothing inside could be read. What Manatee cannot do is invent the part of a download that never arrived, or open an archive whose password you do not have. It runs entirely on your Mac with no upload, which matters when the zip holds someone else’s documents, and every feature is free for the first 24 hours.
Questions
Is it safe to delete the .cpgz files? Yes, as long as the original zip is still in the folder. Each .cpgz is a wrapped copy of that zip and contains nothing new.
Why does the same zip open fine on the sender’s computer? Either their copy is complete and yours is not, or their software supports a compression or encryption method that Archive Utility does not. Compare the exact sizes first. If they match to the byte, it is the method, not the download.
Will downloading it again really help? If Get Info shows a smaller size than expected, yes, and it is the only fix that gets back the missing part. If the sizes already match, downloading again gives you the same unreadable file.