TechJunkie is a BOX20 Media Company

Home PC Windows How to Automatically Delete Zip Files When Opened in Mac OS X

How to Automatically Delete Zip Files When Opened in Mac OS X

How to Automatically Delete Zip Files When Opened in Mac OS X

OS X includes built-in support for zip archives, allowing users to open, extract, and create zip files without the need for additional software. By default, when a user double-clicks on a supported archive file, such as .zip or .tar, OS X will extract the archive’s contents but leave the original archive file in its existing location. For many users, however, this process only creates clutter, as the user may not have need of the original archive file once its contents are extracted. Thankfully, users can change the way that OS X unzips files by accessing some relatively hidden preferences. Here’s how to configure OS X to delete or move a zip file after you extract its contents.
First, for those unfamiliar with how OS X handles archive files, here’s a brief example of what happens by default. The folder in our screenshot below contains a .zip file that we wish to open. To do so, we’ll just double-click on it.

unzip file mac os x

By default, extracting an archive in OS X leaves the original archive file in the same directory.


After double-clicking the .zip file, the contents of the file are extracted to the same folder and we’re left with the archive file’s contents and the original .zip file itself. Unless we want to save the original file for some reason, we’ll now need to manually select the file in Finder and delete it, which is an extra, needless step. To avoid needing to do this, we can modify how OS X handles a .zip file by modifying the preferences for Archive Utility, the system tool that manages archive files in the operating system.
The Archive Utility application file is hidden deep within the OS X System folder: System > Library > CoreServices > Applications > Archive Utility.app. You can either manually navigate to that folder and launch the app, or simply search for “Archive Utility” with Spotlight. Either way, find Archive Utility.app and double-click to open it.
archive utility location mac
With the app launched, click on Archive Utility in the OS X Menu Bar and select Preferences.
archive utility preferences
The Archive Utility Preferences window is divided into two sections that let you configure several options for how archive files are both extracted (top) and created (bottom). In the top section, you can change the default behavior of extracting archives into the same folder, and instead designate a different location in which to store the contents of all extracted zip files. This would be handy if you frequently extract archives from different local and networked locations but want all unarchived file contents to be stored in the same place, such as a folder on your desktop.
archive utility preferences
The “After Expanding” option lets you decide what to do with that original .zip or .tar file once you’ve extracted its contents. Instead of leaving the file in its original location, you can have Archive Utility move it to the Trash, delete it permanently (which bypasses the Trash and removes the file immediately), or move the archive to another location. This last option could be helpful if you want to save backups of your original archive files in location that is out of the way and won’t clutter up your main download or working folders.
In our case, we want to remove the original zip file, but not necessarily delete it immediately. Therefore, we’ll set “After Expanding” to move archive to Trash. Any changes you make in the Archive Utility Preferences take effect immediately, so there’s no need to save or reboot.
Returning to our original example, we’ll try unzipping our sample file again. This time, the contents of the archive appear in our folder, but the original .zip file is automatically moved to our Trash once the operation is complete.
move zip to trash mac

After changing preferences in Archive Utility, our original zip file is moved to the Trash after it is opened.


We think that most Mac users will prefer to either delete their extracted zip files or move them to the Trash, but if you configure this behavior in Archive Utility and later change your mind, you can always return to the Archive Utility Preferences and restore the default options.

Deal: Amazon Prime Members Can Get 3 Free Audiobooks from Audible

Read Next 

Leave a Reply

Your email address will not be published.


Jim Tanous

Feb 17, 2016

676 Articles Published

More