6

In Gmail, is there a query I can use to find all emails before a certain date? My company currently has a mailbox with 500K emails and it's starting to get really slow when performing a query. I'd like to start keeping it pruned to only the last 6 months worth of e-mail.

migrated from superuser.com Apr 29 '14 at 20:03

This question came from our site for computer enthusiasts and power users.

5

Yes, use Gmail advanced search operators, for instance:

older_than:6m

  • A handy GMail feature that helps with tasks like this is the "Quick Link" feature under Labs. Go to Settings > Labs and enable it. This creates a new box in the left-hand side of your GMail Inbox. When you execute a useful search, you can save it there as a "Quick Link" for one-click access in future. Here is a search for messages greater than 1 MB in size, older than 1 year, in my Inbox: "size:1000000 in:inbox older_than:1y" – Tom Hughes Apr 29 '14 at 20:46
2

For Gmail users

Step 1: Type "older_than:Xy" into search (X being the value in years that you want to highlight and eventually delete. You can also do months or days by using m or d instead of y)

Step 2: Hit the select all button in the upper left hand of the inbox

Step 3: When all of the entries on that page are highlighted, a line that says "All 50 conversations on this page are selected. Select all conversations that match this search" should come up at the top of the inbox. Click on that. This will select all of the emails that matched your search criteria (that is, everything older than so many years)

Step 4: Hit delete.

0
after:2010/9/21 before:2016/6/22

This is how i did what I wanted to do.

Older_than:6m didn't seem to work.

0

before:2018/04/30

This command can help you find all the email before the date. You can also find in advanced filter.

-1

Before:[date] is the query you're looking for, here's where I found the answer: https://support.google.com/mail/answer/7190?hl=en

Not the answer you're looking for? Browse other questions tagged or ask your own question.