Clean Email

Gmail Search Operators: The Complete Cheat Sheet

TL;DR

Gmail's search bar supports dozens of operators that go far beyond typing a keyword. This page covers the ones that matter most for finding and cleaning up old mail, plus how Clean Email uses them.

What Are Gmail Search Operators?

A Gmail search operator is a keyword followed by a colon, typed into the Gmail search bar, that filters your inbox by a specific property instead of just matching text.

For example, typing invoice searches for the word "invoice", but typing has:attachment searches for a property of the message — whether it carries a file — regardless of what the email says.

Operators can be combined in a single search, which is what makes them powerful for finding exactly the mail you want to read, archive, or delete.

Reference Table: Useful Gmail Search Operators

These are the operators most useful for inbox cleanup. All of them work when typed straight into Gmail's search bar.

OperatorWhat it findsExample
category:promotionsMarketing and promotional emailscategory:promotions
category:socialSocial network notificationscategory:social
older_than:Mail older than a given time (d = days, m = months, y = years)older_than:1y
newer_than:Mail newer than a given timenewer_than:7d
has:attachmentMessages with any attachmenthas:attachment
is:unreadMessages you haven't opened yetis:unread
is:starredStarred messagesis:starred
from:Messages from a specific sender or domainfrom:newsletter@shop.com
larger:Messages above a given sizelarger:10M
label:Messages carrying a specific Gmail labellabel:Receipts

Combining Operators for Powerful Searches

Put a space between operators to combine them (Gmail treats this as AND). Add a minus sign before an operator to exclude matches.

How Clean Email Uses These Operators to Scan Your Inbox

Clean Email doesn't ask you to memorize any of this. After you sign in with Google, it builds a single Gmail search query per scan — everything in your inbox except protected mail — using operators such as -is:starred, -has:attachment and -in:sent to exclude protected mail up front, not to offer category- or age-based cleanup choices.

Protection is checked twice. First, operators narrow the search query up front so protected mail is excluded from the count early. Then, right before any deletion, Clean Email checks each message again individually — the authoritative guard — so protection holds even if a Gmail search operator behaves unexpectedly.

This is why a scan of thousands of emails takes only a few seconds: Gmail's own search index does the heavy lifting, the same index behind the search bar you use every day. Clean Email only reads message metadata (sender, labels, size, thread ID) to build these counts — it never reads or stores the content of your emails.

FAQ

What is the Gmail operator to find old emails?
Use older_than: followed by a number and a unit — d for days, m for months, y for years. For example, older_than:1y finds every email older than one year, and older_than:6m finds mail older than six months.
How do I search Gmail for emails with attachments?
Type has:attachment in the Gmail search bar to show every message that carries a file, photo, PDF, or other attachment. Combine it with a size operator, like has:attachment larger:10M, to find large attachments specifically.
How do I find promotional or newsletter emails in Gmail?
Type category:promotions in the Gmail search bar. Gmail automatically sorts marketing emails and newsletters into this category, so the search returns them without you needing to know each sender.
Can I combine multiple Gmail search operators in one search?
Yes. Put a space between operators to combine them — for example, category:promotions older_than:1y finds promotional emails older than one year. Add a minus sign before an operator, like -has:attachment, to exclude matches instead.
Does Clean Email read the content of my emails when it scans my inbox?
No. Clean Email only reads message metadata — sender, labels, size, and thread ID — to build counts of what can be cleaned. It never reads, stores, or displays the content of your email bodies.
What's the difference between is:unread and label: in Gmail search?
is:unread finds messages you haven't opened yet, based on Gmail's read/unread status. label: finds messages carrying a specific Gmail label you've created or applied, regardless of whether they've been read.

Sources

Clean your Gmail inbox now

Sign in with Google, scan your mailbox for free, then clean it in one click.

Clean your Gmail inbox now

Updated: 2026-07-29