One of the new features in the Mail app in OS X Mavericks was better integration for Gmail accounts. Although the so-called enhancements got off to a shaky start, Apple released a patch to fix a majority of the issues. After adjusting my Gmail settings to show my All Mail folders, things worked pretty well for my Gmail accounts in Mail on OS X – except for one nagging issue.
I am an email hoarder and prefer to archive my Gmail messages rather than delete them. Prior versions of Mail were great for this, as hitting the delete key would simply remove the Inbox label from any message that was selected – in other words it would archive the message. Unfortunately, in OS X Mavericks the delete key started behaving differently, moving selected messages to the Trash.
I searched high and low for a solution to this annoyance and found a reasonable solution that relies on a program called Keyboard Maestro. The only problem with this solution is that Keyboard Maestro charges $36 USD for a license. That isn’t too unreasonable if you plan to use its other powerful features, but all I wanted was my delete-to-archive behaviour back in Mail. Frustrated with the lack of affordable options, I did some research into Mail plugins and created a simple solution to my problem.
Delete2Archive is a plugin for Mail in OS X that brings back the old delete key behaviour for Gmail accounts, archiving messages instead of moving them to the trash!
- Quit Mail.
Extract the Delete2Archive.mailbundle folder from the zip file and move it to
(where ~ indicates your home folder). To open the Library folder in Finder (it is hidden by default), hold down the Option key while selecting the Go menu, then select the Library menu item. If you don’t have a Bundles folder, see the additional instructions below.
Some users have had issues installing the plugin because they don’t have a Bundles folder as described in step 3 of the installation instructions. If you have never installed a Mail plugin before, you may need to follow these additional steps prior to installing the Delete2Archive plugin:
- Using Finder, navigate to
and create a new folder called Bundles. To get to the Library folder (it is hidden by default), hold down the Option key while selecting the Go menu, then select the Library menu item.
Open the Terminal app.
Enter the following two commands, hitting the enter key after each one. This step adjusts some behind-the-scenes settings in Mail so that it checks for plugins each time it launches.
defaults write ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist EnableBundles -bool true defaults write ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist BundleCompatibilityVersion -int 4
The plugin is very simple – it listens for delete key events and translates them into archive actions (the equivalent of selecting Message > Archive in the Mail menu) – so there are no preferences or customization options. If you decide you don’t want to use the plugin down the road, simply move the Delete2Archive.mailbundle folder to the trash and restart Mail. As this is my first attempt at a Mail plugin, it might not work perfectly for everyone. If you run into any issues, please leave a comment below or get in contact with me.
The plugin must be updated for compatibility with each update to OS X. The current version can be downloaded above (see the Installation Instructions) and prior versions of the plugin are listed below for reference:
- Delete2Archive-10.10.1.zip for OS X 10.10.1
- Delete2Archive-10.10.zip for OS X 10.10
- Delete2Archive-10.9.5.zip for OS X 10.9.5
- Delete2Archive-10.9.4.zip for OS X 10.9.4
- Delete2Archive-10.9.3.zip for OS X 10.9.3
- Delete2Archive-10.9.2.zip for OS X 10.9.2
- Delete2Archive-10.9.1b.zip for OS X 10.9.1 (All languages)
- Delete2Archive-10.9.1.zip for OS X 10.9.1 (English only)
- Delete2Archive.zip for OS X 10.9.0
When Apple released OS X 10.9.2, I received several messages from Gmail users stating that the pre-Mavericks delete key behaviour was reinstated in Mail. I did some testing and it appeared that this was the case for my installation as well. Unfortunately, I also got messages from users thanking me for updating Delete2Archive because they still needed it to archive messages in OS X 10.9.2 with the delete key.
Having used OS X 10.9.2 for more than three months without Delete2Archive, I am now confident that Apple has corrected the behaviour and it is possible to archive Gmail messages using the delete key in Mail without any plugins. That said, for those that choose to continue using Delete2Archive, I will maintain it for the foreseeable future. Before you install the latest version, perhaps it is worthwhile to take a few minutes to test your system to see if you actually still need it?
Delete2Archive was originally created to address an issue specific to Mail running on OS X 10.9 Mavericks, but with the release of OS X 10.10 Yosemite I’ve had numerous requests to continue updating the plugin. As such, I’ve gone through the contents of this page and updated several references to ‘OS X Mavericks’ to instead read ‘OS X’ so that the information is applicable to both versions of the operating system.