Gmail Cleanup Query Builder

Last reviewed: September 23, 2026 · Markdown version

Tick what you want to find. Get the exact Gmail search to paste into the search box — the honest, manual way to hunt down clutter.

Bigger than
Older than
Gmail category
Attachments

Pick none for any file type.

From sender
Also

Careful: in:anywhere includes Spam and Trash — check what you're deleting.

Runs entirely in your browser — nothing you type is sent anywhere, and nothing is stored.

What each operator means

Nothing here is invented. Each operator below, and the description beside it, comes from Google's own operator table (Refine searches in Gmail, Gmail Help, read 23 September 2026) — the builder above only assembles them for you. That page lists more operators than the builder uses.

OperatorWhat it findsExample
larger:Find emails by their size.larger:10M
older_than:
newer_than:
Search for emails older or newer than a time period. Use d (day), m (month), or y (year).older_than:1y
before:
after:
Search for emails received during a certain time period.after:2004/04/16
has:attachmentFind emails that include attachments.has:attachment
filename:Find emails that have attachments with a certain name or file type.filename:pdf
category:If you use inbox categories, find emails under one of the categories. Documented values: primary, social, promotions, updates, forums, reservations, purchases.category:promotions
from:Find emails sent from a specific person.from:newsletter@example.com
is:unreadSearch for emails by their status — here, unread.is:unread
in:anywhereFind emails across Gmail. This includes emails in Spam and Trash.in:anywhere

Google's page says you "can also combine operators to filter your results even more", and its own examples do it by writing them one after another with spaces (is:muted subject:team celebration). The builder joins its parts the same way, one condition after another. The operator table has no unsubscribe operator: search can find the mail a sender keeps sending you, but it cannot stop the sending.

Two searches worth running first

Search finds — it never deletes. When you delete what it found, Gmail moves it to Trash, where it stays for up to 30 days unless you empty Trash first (Delete messages in Gmail, Gmail Help, read 23 September 2026). Not sure email is your storage problem at all? Start with the one-minute diagnosis.

Or do it in taps instead of queries.

A search finds one slice at a time. Adinand Email Cleaner shows your whole Gmail grouped by sender instead, so a sender's backlog goes to Trash in one tap, and unsubscribing from that sender is one more. The app requests headers, not message bodies or attachments, and the work happens on your device. Nothing it removes is deleted permanently — it lands in Gmail's Trash, same as a delete you make yourself.