.DS_Store
and __MACOSX
are two of the most common files and folders that are added to zip files when compressed on macOS. __MACOSX
especially is problematic because it contains duplicates of every file in the zip archive. So for example, if you use Finder to compress 20 files, the resulting zip file will contain the original 20 files, plus an additional 20 files all hidden under the /__MACOSX/
folder.__MACOSX
directory, which is visible on PC when you open the zip file..
, which makes the files hidden by default on most systems.__MACOSX
folder and all the hidden files are not included (i.e., they do not exist hidden or otherwise) in the unzipped archive.__MACOSX
directory and its duplicate set of files can cause problems with things like installing WordPress plugins and other applications. So if you are WordPress/Web developer, use a version-control system to manage and package/zip your files. That way you keep all the hidden junk completely out of the picture. Alternately if you aren’t using version control, you can remove/exclude unwanted hidden files using one of the techniques below.__MACOSX
and .DS_Store
from any zip archive. The files literally are useless. Read on to learn some different techniques for removing the __MACOSX
and .DS_Store
from ZIP Files on macOS.zip
command to compress/zip files without any hidden files like .DS_Store
and __MACOSX
. Here are the steps:data.zip
and located in the same directory as the original uncompressed files. The data.zip
archive will not include any __MACOSX
or “dot-hidden” files (i.e., file names that begin with a literal dot).cd
and ls
commands to navigate in Terminal.Folder
that includes a bunch of files that you want to zip/compress.data.zip
on your desktop that does not include any __MACOSX
or .DS_Store
files. I.e., a nice clean zip file with no hidden garbage.q
(quiet) or qq
(quieter) parameter to the previous bulk-delete command: