Skip to main content
coreydaley.dev

Why a ZIP turns into a .cpgz on a Mac

You double-click a ZIP and get a .cpgz file. Double-click the .cpgz and you get the ZIP back, and around it goes.

What’s happening: Archive Utility, the app that runs when you double-click an archive, couldn’t read the ZIP. Sometimes, instead of showing an error, it does the opposite of what you asked: it compresses the file into a new .cpgz archive. Expanding that .cpgz just gives you your unreadable ZIP again.

Once you have the original ZIP, the .cpgz files can go. The question is why the ZIP couldn’t be read. Most often it’s one of these:

  • The download didn’t finish. A common cause: the file is missing its end, where a ZIP keeps its list of contents.
  • The file is damaged, from a failing drive or a bad transfer.
  • It isn’t really a ZIP, or it’s a kind Archive Utility doesn’t support, such as a RAR renamed to .zip.

1. Download it again

If the ZIP came from the web or an email, download it again, ideally in a different browser, and compare the file size with what the site says. A fresh copy fixes most cases.

2. See the real error

Terminal gives a straight answer where Archive Utility doesn’t:

unzip -t ~/Downloads/file.zip
  • End-of-central-directory signature not found means the end of the file is missing: an interrupted download, or not a ZIP at all.
  • need PK compat. v5.1 means it’s an encrypted ZIP: see Can’t open a password-protected ZIP.
  • No errors detected, with nothing skipped, means the ZIP is fine; try opening it with another app.

3. Open it with another app

Some ZIPs that trip up Archive Utility open fine elsewhere. Try the original ZIP (not a .cpgz) in Purrchiver or The Unarchiver, both free to open archives.

4. Recover what’s readable

New in Purrchiver 1.1. If you don't see it, update Purrchiver from the App Store.

If the ZIP really is damaged and you can’t get another copy, most of it is usually still readable. Purrchiver can recover every file that’s intact and mark anything only partly recovered as (incomplete), free. See Repair a damaged or corrupt ZIP on a Mac.

Download on the Mac App Store

Free forever to open and extract anything. $9.99 once for the advanced tools. No trial, no subscription.