This story has been updated. It was originally published on August 2, 2018.

Pursuing inbox zero can feel like fighting a losing battle every day. Even as you attempt to tackle your email backlog, more messages continue zooming in. But what if you did a complete reset? Instead of sorting that dusty archive, you could just delete it in one fell swoop.

How many emails do you need to keep around, anyway? It’s great to hold on to a project outline from your boss and the first love note from your future spouse, but hundreds of meaningless alerts and updates surround these significant messages. Delve back more than a month or so, and most of your inbox fodder will be a waste of space that you’ll never long to revisit. Deleting them is a quick way to lift the anxiety that hits you every time you notice you have thousands of unread emails. To stay organized, you might even carry out this scorched-earth approach at regular intervals.

Email clients like Gmail, Outlook, and Apple Mail make it easy to clear individual messages. But in this guide, we’re talking about wiping out hundreds of messages at once. Mass-deletion is easier in a web browser or desktop client than a mobile app, so we recommend you perform this task on your computer, rather than your phone.

Preserve important emails

Of course, we don’t want you to erase emails that are actually important to you—like a message that outlines an important upcoming interview or includes an attachment with the deed to your house. So before you mass-delete messages, go through your inbox to find and save the vital ones.

Start by searching for key terms, such as “attached,” “contract,” and the names of important people like your boss, lawyer, and family members. Also run through the threads you’ve starred or marked as important.

Once you’ve found the messages worth preserving, you’ll need to get them out of the way of your upcoming purge. Forward them to a different email address (you might create a separate account specifically to hold important messages), move them to a folder you plan to exclude from the mass deletion, print them on paper, or save them as digital PDFs. We recommend the last of those options, because this lets you stash your valuable emails on your computer’s local storage, in the cloud, or both.

To create a PDF, pull up the email you’d like to save, and hit print. Then, instead of sending it to a printer, save it as a PDF. To do this on Windows, click the dropdown menu next to Name and select Microsoft Print to PDF. On macOS, PDF should appear as an option in the lower-left corner of the print dialog—click that and select Save as PDF to set your save destination and any other file attributes you’d like. If you’re working in a browser, your options may vary slightly, but on Google Chrome you’ll see Save as PDF in the dropdown menu next to Destination.

How to delete emails in Gmail

Emptying your entire Gmail account couldn’t be much easier. First, click All Mail on the left (you might have to scroll down a bit) to access every message in every folder. When you select all on-screen messages—by ticking the selection box in the top left—a new link should appear at the top of the page. This lists the total number of emails in your account, and it lets you Select all conversations. Click that link, hit the Delete button (the trash can icon), and every email in your inbox will disappear.

If you don’t want to get rid of everything, run a search or select a category other than All Mail, and follow the same steps we described above to delete your smaller group of messages. This approach won’t clear out everything, but it will enable you to be more precise in your inbox clean-up.

[Related: 9 advanced Gmail searches that will dig up stuff you never knew you missed]

For example, if you have a label for miscellaneous and unimportant emails, you could wipe that out. Or if you have tons of unread emails that you know you’ll never read, search for “is:unread” and delete those. We also recommend that you look up and erase emails by time period: For instance, a search for “older_than:1y” will pull up any messages more than a year old.

Delete all your Outlook messages

With the Outlook email client, you can’t slash and burn everything like you can in Gmail. Instead, you’ll have to work through your folders one by one. Depending on how many folders you have, this might take a while, though it will give you more flexibility in terms of which emails get erased and which don’t.

You might as well start with your inbox: Click Inbox, switch to the Folder tab on the ribbon menu, and select Delete All. Once you’ve confirmed your choice, all messages in that folder will move to the Deleted Items folder. This bin will automatically erase messages after 30 days, or you can empty it manually by opening it, heading to the Folder tab, and clicking Empty Folder. Repeat the process for your Archive folder, and continue on with the others. To remove a category entirely, select it, go to the Folder tab, and choose Delete Folder.

If you access your emails through the web portal, the process is pretty similar, except that you won’t need to use the commands in the Folder tab. Instead, when you’re ready to delete a folder’s contents, open it, hit Ctrl+A (on Windows) or Cmd+A (on a Mac) to select everything, and click Delete. To delete a folder entirely, right-click on it and choose Delete.

As with Gmail, we recommend you try out some search terms to narrow your doomed selection by date or sender. For example, type “from:” followed by an email address to find messages from important contacts, so you can move those to safety. To limit your to-be-deleted pile to older emails, type in “before:mm/dd/yyyy“.

How to delete Apple Mail in bulk

Within the Apple Mail email client on macOS, you wipe your history folder by folder—just like in Outlook. If you’ve already organized your inbox, this makes it easy to separate the important messages from the disposable ones. Once you’ve decided which folder to erase, you can delete the messages within, or trash the whole folder and its contents at once. As with Outlook, deleted emails stick around for 30 days in case you want to recover them.

To keep the folder (or “mailbox” in Apple parlance) itself, hit Cmd+A to select every message in that category, and then tap the Delete key. For folders you created within your primary iCloud account, you can get rid of them and their messages in one operation: Right-click or Ctrl+click a folder under the iCloud heading, select Delete Mailbox, and click Delete on the dialog that pops up.

You can also clear messages through the iCloud website. Head to the Mail component of the web interface, then open any folder. Select one message, hit Cmd+A to select all the messages in that folder, and click the Trash button at the top of the page.

As with Gmail and Outlook, search operators will help you erase more selectively. For example, type “from:” followed by an email address to identify (and then export or move) messages you want to keep. To get time-selective, you can highlight date ranges by typing “date:mm/dd/yyyy-mm/dd/yyyy” into the search box at the top.