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.
Runs entirely in your browser — nothing you type is sent anywhere, and nothing is stored.
Your Gmail search
Tick anything above and the search appears here.
Open this search in Gmail (signed in to more than one Google account? It may open in the wrong one — if so, paste the copied search into the right one)
Search finds — it never deletes. You still review and delete yourself. Deleted mail moves to Gmail's Trash and the storage frees only after Trash clears (30 days, or empty it now): see Does deleting emails actually free up storage?
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.
| Operator | What it finds | Example |
|---|---|---|
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:attachment | Find 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:unread | Search for emails by their status — here, unread. | is:unread |
in:anywhere | Find 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
category:promotions older_than:1y— a year and more of marketing mail you have already ignored once.has:attachment larger:10M older_than:2y— the heavy old messages. Google's own storage advice is to "Find and delete one or two emails with very large attachments you no longer need", and it suggestshas:attachment larger:10Mfor the job (Manage your storage in Drive, Gmail & Photos, Google Drive Help, read 23 September 2026).
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.