How to Open a Zip File That Turns Into a CPGZ

Feb 13, 2013 - 17 Comments

Ever had a zip file turn into a cpgz file? This is an infrequent problem, but here’s what happens; When the .zip file is attempted to be unzipped, it extracts into a .cpgz file, which then can also be launched in Archive Utility, only to then turn back into a .zip file, which then turns into a .zip.cpgz file, and basically the archive gets stuck in an infinite loop as it’s being decompressed into one variation of the other, over and over again. Annoying, right?

Zip to CPGZ loop

Why this happens isn’t always completely clear, but it can be indicative of a few things:

  • Corrupted file, either during download or from origin
  • Incomplete download, stopped at 99% done or similar
  • Certain web browsers mishandling a file during or after the download process
  • A bug

Accordingly, dealing with the zip cpgz loop is usually best handled in a few different ways. Before beginning, you may want to check the md5 hash or SHA1 of the origin file if possible, that can easily tell you if the file was corrupted or is incomplete. Nonetheless, not all servers provide you with either, so we’ll cover three ways to handle this issue without that, and crack open that error prone zip archive once and for all.

1: Download the File Again with a Different Browser

If you downloaded the original file with Firefox, try Chrome or Safari, and vice versa. Sometimes it’s just a matter of redownloading the file again before it unzips normally. This is great for smaller files, but large downloads don’t always make sense to do this with, and if you know for sure the file isn’t corrupted because of checking md5/sha1 sums or otherwise, you can attempt two other options.

2: Unzip from the Command Line

The command line unzip tool is often able to break archives out of the .zip to .cpgz cycle, do the following with the original .zip archive:

  • Launch Terminal, found in the /Applications/Utilities folder
  • Find the .zip file in the Finder and have it easily accessible
  • At the command line type “unzip ” followed by a space, then drag and drop the .cpgz or .zip file into the terminal window to automatically enter the full path to that file, then hit return
  • Unzip a file from the command line and GUI

  • The archive should expand as usual, giving you the contents

Forcibly unzipped zip file as done by the unzip command

The command line method should work basically every time, as it will forcibly extract even partially downloaded files. If you know the file is only partially downloaded though (by way of checking md5 hash or otherwise), you really ought to just download the file again.

3: Install & Use The Unarchiver

The Unarchiver is a third party tool that can be thought of as a swiss army knife of compression formats, able to work with virtually any archive file format you can throw at it. It works in much the same way as the default Archive Utility, only running when an archive is encountered, which it quickly decompresses then quits again. As such, it can also be used to forcibly extract problematic zip/cpgz files:

  • Download The Unarchiver for OS X and install it, make sure it associates with all archive formats
  • Open the problematic .zip or .cpgz file (generally focusing on the origin zip is best) through Unarchiver and let it decompress

The archives files should now be accessible as intended.

On a quick side note, with Archive Utility having some crashing problems lately, there has never been a better time do grab an alternative like The Unarchiver. It’s free, handles archives of just about any conceivable format, and is highly recommended.

This troubleshooting post comes in response to a question we recently got recently on Twitter (don’t forget to follow us there too), and, as luck would have it, I then encountered the same issue myself after downloading the mouse sharing app Teleport. For my purposes, I used the command line method, but Unarchiver was also confirmed to work just as well.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks, Troubleshooting


» Comments RSS Feed

  1. sault says:

    It was high time someone talked about this problem. Well done.

  2. Caleb Grove says:

    Thanks guys! I had a .zip file that was doing this to me, but The Unarchiver came to my rescue!

  3. Joe says:

    This will also happen if someone mails you a link to a zip file in Dropbox, and you right-click on that link and ‘Save Link As’.
    Instead, click on the link, and download it from the Dropbox page that is displayed.

  4. Derek Scott says:

    I had this problem with a zip of mp3 files (Mac OS X and downloaded via Firefox). I went o the File menu, clicked on “Get Info” and then changed Open with: Archive Utility to Open with: Stuffit Expander.
    To my surprise it worked a treat. This seems to indicate that the files had downloaded OK, and the problem lies elsewhere.

  5. Nina says:

    Thanks so much for this! Had a zip archive that was doing this but the Terminal work around solved it. You’re a life saver!

  6. paymar says:

    any way to open zip files with spaces in file name..tried few attempts different software, but no luck

  7. Lucas says:

    Terminal works thks! =D

  8. Jeffcm says:

    I downloaded a 4 gb file several times, and tried two different browsers, safari and firefox. System 10.8.4 would NOT open it, even using Terminal. Terminal said the file was corrupt…

    I copied it via an external hard drive to my old 10.4.11 laptop, and that old system opened it up just fine! Copied the open folder back to the new laptop and everything installed perfectly.

  9. Harsh says:

    The inbuilt inflater ability of OSX does not recognise some of the modern formats of .zip packing, thereby causing this. The ‘unzip’ CLI tool may work sometimes, but otherwise one could also do a “brew install 7zip” and use “7za x ” to extract just about any format on the command line.

    The Unarchiver is a nice suggestion, thanks.

  10. Lisa says:

    I just downloaded a file like this. The name of the file had no extension. When I added “.zip” to the end of the name, it unpacked normally when double-clicked. May be the easiest thing to try first.

  11. ffs says:

    new mac user here, jays us it worked! thank you!

  12. It Worked! – The CPGZ loop threw me off for some time. After reading your advice I tried the terminal method and worked perfectly.


  13. Jordan says:

    I get this error when trying to use terminal

    pcn:~ JordanLawrence$ unzip /Users/JordanLawrence/Downloads/
    Archive: /Users/JordanLawrence/Downloads/
    skipping: For Jordan.xls need PK compat. v5.1 (can do v2.1)
    pcn:~ JordanLawrence$

  14. sumit says:

    stuffit expander seems to work too..

  15. thedoger82 says:

    I didnt any if the steos above, i opened it in windows with winrar, and it work normally

  16. David says:

    Thank you! Terminal worked.

    FYI, in case others can’t find their uncompressed file/folder, mine showed up in the root of my user directory (alongside Applications, Documents, Pictures, etc).

Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates