Gmail Cleanup Query Builder
Last reviewed: August 30, 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 (opens in your first signed-in account — or 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. These are Gmail's own search operators, as documented in Gmail's own search-operator reference — the builder above only assembles them for you.
| Operator | What it finds | Example |
|---|---|---|
larger: | Find emails by their size. | larger:10M |
older_than:newer_than: | Find emails older or newer than a period of time, using d for day, m for month and y for year. | older_than:1y |
before:after: | Find emails sent before or after a specific date. | after:2004/04/16 |
has:attachment | Find emails that have an attachment. | has:attachment |
filename: | Find emails that have attachments with a certain name or file type. | filename:pdf |
category: | Find emails in one of Gmail's categories. Documented values: primary, social, promotions, updates, forums, reservations, purchases. | category:promotions |
from: | Find emails from a specific sender. | from:newsletter@example.com |
is:unread | Find emails that are unread. | is:unread |
in:anywhere | Search for emails across all of Gmail — this includes emails in Spam and Trash. | in:anywhere |
Operators combine by writing them one after another, separated by spaces: every condition has to match. There is no unsubscribe operator — Gmail's 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. Email storage lives mostly in attachments, so a hundred of these can outweigh ten thousand newsletters.
Or do it in taps instead of queries.
Zen Inbox Cleaner groups your Gmail inbox by sender, so you can trash bulk mail, newsletters, and promotions in one tap — and unsubscribe with one tap. It reads email metadata only (never bodies or attachments), everything happens on your device, and nothing is permanently deleted by the app — trashed email stays recoverable in Gmail's Trash for 30 days.