Quick Links
Summary
You can automatically delete or archive old emails in Gmail by creating a filter. Enter your filter’s search criteria, complete with timeframe, into the Search box. Click the “Show Search Options” button and then “Create filter.” Choose Archive or Delete and then click “Create Filter” to save and apply it.
Keeping your Gmail inbox clean can be quite a task these days. Instead of manually looking forold emails you want to deleteor archive, you can set up a filter to do this automatically based on a selected timeframe. We’ll show you how.

Automatically Archive or Delete Old Emails
To get started, head to theGmail websiteand sign in with your Google account. Go to the Search box at the top of Gmail and enter the criteria you want to use.
For example, to onlyarchive or delete emailsin your inbox, you’ll use

or
before the timeframe. Then, add

followed by the timeframe, using “d” for days, “w” for weeks, or “y” for years.
As an example, to find emails older than 90 days, you’d use the following:

Or, to see messages older than two years, you’d use:
After you enter the criteria, press Enter or Return, and you’ll see the emails in your inbox that match.
Next, select the “Show Search Options” icon, located on the far right of the Search box.

When the window opens, you’ll still see yourcriteria in the search box. Go to the Has The Words field and enter just the timeframe.
Using our above examples, you’d enterolder_than:90dorolder_than:2y.
Select “Search. You should see the same emails in the list. Click the “Show Search Options” button again and this time, choose “Create Filter.”
You’ll see a warning informing you that the terms you’re using won’t match incoming emails. However, you know this because you’re looking for old emails, not new ones.

Click “OK” to continue.
In the next box, you’ll choose whether you want toarchive or delete the emails. To archive them, check the box for “Skip the Inbox (Archive it).” To delete them, check the box for “Delete It.”
Related:What’s the Difference Between Archiving and Deleting Emails?

Optionally, you can check the box at the bottom of the list to apply the filter to any matching conversations in your inbox.
When you finish, select “Create Filter” to save and apply the filter.

You canlocate your archived emailsorreview the deleted emailsat any time if you like.
Optional: Confirm the Filter Works
If you checked the box to apply the filter to existing conversations in your inbox, you can check immediately that the filter did its job.
Return to your inbox and enter the search criteria you used to create your filter into the Search box. Press Enter or Return. You should see a message that no emails match your search.

Edit or Remove the Automatic Archive or Delete Filter
Once youset up the filter, you no longer have to worry about selecting and archiving or deleting emails in your inbox by hand. The filter handles it all for you. But if you want to edit or remove the filter, you’re able to certainly do so.
Related:How to Automatically Forward Specific Emails in Gmail
Select the gear icon on the top right of Gmail and choose “See All Settings” in the sidebar.
Select the “Filters and Blocked Addresses” tab. You’ll see your filter in the list with any others you’ve created. To change the filter, select “Edit” on the right side.

Make your changes in the pop-up window and select “Update Filter.”
To remove the filter altogether, select “Delete” on the right side and then confirm that you want to delete the filter by clicking “OK.”
Save time by automatically archiving or deleting your emails in Gmail. You can then keep your inbox clean and spend your time on more important things.