How to remove __MACOSX from zip archives

- by

Creating a ZIP file on your Mac is really easy: select a few files in Finder, right-click on those and select “Compress…”. It’s the equivalent of selecting “Send to ZIP Folder” under Windows.

But Mac OSX does something rather bizarre when creating ZIP files: it adds several unnecessary, unwanted and un-called-for files starting with __MACOSX. This drives PC users nuts – and believe me, it drives Mac users nuts too.

Thankfully there is a relatively easy way to remove those files. This may not always be necessary, but if you require a “clean” ZIP file, here’s what you can do.

First, create your ZIP via the finder – like you always do. Next, open Terminal and cd into the directory where your ZIP file is located. If it’s a long path, just type “cd “, then drag the folder into Terminal (less typing is always good).

Now type the following:

zip -d "__MACOSX*"

And that should do it. This command (zip) will remove everything (-d) starting with __MACOSX from your ZIP file (

To verify, type the following:

unzip -l

This will simply list the contents of

Alternatively there is a utility called YemuZip:

Or just use a PC 😉

If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

8 thoughts on “How to remove __MACOSX from zip archives”

  1. it doesn’t drive anybody nuts… simply put, you and my professor a people with nothing better to do

  2. ? There is that for sure… There’s also technical requirements for vendors you might work with, which is what inspired this post: I was delivering 3D files as a ZIP package to a vendor (Renderosity) and they reject files that contain those additional Mac files. Hence, I had to remove them. They still drive me nuts though when I’m fiddling on the command line though. Tell your professor I understand him ?

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.