Quick Links

Key Takeaways

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 for old emails you want to delete or 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 the Gmail website and 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 only archive or delete emails in your inbox, you'll use

        label:inbox
    

or

        in:inbox
    

before the timeframe. Then, add

        older_than:
    

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:

label:inbox older_than:90d

Or, to see messages older than two years, you'd use:

label:inbox older_than:2y

After you enter the criteria, press Enter or Return, and you'll see the emails in your inbox that match.

Gmail Search emails older than 2 years

Next, select the "Show Search Options" icon, located on the far right of the Search box.

Show Search Options icon

When the window opens, you'll still see your criteria in the search box. Go to the Has The Words field and enter just the timeframe.

Using our above examples, you'd enter older_than:90d or older_than:2y .

Timeframe in the Has the Words field

Select "Search. You should see the same emails in the list. Click the "Show Search Options" button again and this time, choose "Create Filter."

Create Filter for the search criteria

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.

Confirm creating the filter

In the next box, you'll choose whether you want to archive 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.

Create Filter for the search criteria

You can locate your archived emails or review the deleted emails at 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.

Message that no emails match the search

Edit or Remove the Automatic Archive or Delete Filter

Once you set 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 can 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.

Gear icon and See All Settings in Gmail

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.

Edit and Delete options for a filter

Make your changes in the pop-up window and select "Update Filter."

Update Filter for a changed 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."

Confirmation for deleting a filter

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.