Updated
How to Remove .DS_Store and __MACOSX from a Zip File on Mac
With Actions
Make a shortcut one time, and then use it from the right-click menu of Finder:
- Install Actions, and open it once.
- In the Shortcuts app, click the add button to make a new shortcut, and give it a name, like “Clean Zip”.
- Click the details button in the sidebar, and select “Use as Quick Action”, with “Finder” selected.
- Add the “Clean Zip” action of Actions. Its file field must show “Shortcut Input”. Then add the “Save File” action of Shortcuts.
- In Finder, Control-click a zip file, and choose “Quick Actions”, then your shortcut.
- Choose where to save the clean zip file.
If the shortcut is not in “Quick Actions”, choose “Quick Actions › Customize…”, and turn it on. Apple’s instructions for quick actions.
The action removes each .DS_Store file and the __MACOSX folder, and keeps all other files as they are. It does not change the original zip file: you get a clean copy.
Get Actions
Additional actions for the Shortcuts app
Free
- Platforms
- macOS, iOS, visionOS
- Requires
- macOS, iOS, or visionOS 26 or later
- Category
- Utilities
- Released
- October 2021
- Privacy
- No personal data collected
- Updated
- June 2026
- Version
- 4.2.0
- Size
- 29 MB
- US App Store rating
- 4.8/5 (529 ratings)
Without an app
Terminal has the zip command. To remove the files from a zip file that you already have:
zip -d archive.zip "__MACOSX/*" "*.DS_Store"
To make a zip file without them, do not use “Compress” in Finder. Go to the folder that contains your folder, and run:
zip -r archive.zip folder -x "*.DS_Store"
The zip command does not add a __MACOSX folder, and -x leaves out the .DS_Store files.
Both ways give the same result. Terminal is fast when you know it. The shortcut is easier when you send zip files often, as it is two clicks in Finder.
