Most Gmail cleanups stall on the same step: typing the right search. Searches like older_than:2y larger:10M work well, but few people remember the syntax, and one wrong word can match mail you meant to keep.
Pick a common cleanup or set your own age, size and sender, then copy the search into Gmail. Read the results, select them, and delete. Starred and important emails are left out by default, so the search skips the messages you have already flagged as worth keeping.
How to use the search in Gmail
- Copy the search above, or click Open in Gmail to run it directly (this works on a computer).
- Paste it into the search bar at the top of Gmail and press Enter.
- Scroll the first page of results. If anything you need shows up, add a rule in step 2 or star it.
- Tick the select-all box above the list. Gmail then shows a link that selects every matching conversation, not just the first page.
- Click Delete. The mail moves to Trash, where it stays for 30 days before Google removes it for good (Google).
For the full walkthrough, see how to bulk-delete Gmail messages on a computer.
Ready-made searches for common cleanups
| Goal | Search to paste | What it finds |
|---|---|---|
| Free up the most space | larger:10M -is:starred -is:important | Emails over 10 MB, usually photo or video attachments |
| Clear old shopping mail | category:promotions older_than:1y -is:starred | Promotions tab mail older than one year |
| Find senders to unsubscribe from | category:promotions is:unread older_than:6m | Promotions you never opened in the last six months or more |
| Remove old attachments | has:attachment older_than:3y -is:starred | Any attachment older than three years |
| Clear social notifications | category:social older_than:6m | Social tab alerts older than six months |
| One sender’s back catalog | from:[email protected] older_than:1y | Everything older than a year from one address |
| Mail you never filed | has:nouserlabels older_than:5y -is:starred | Old mail without any of your own labels |
What each part of the search means
| Part | Meaning | Example |
|---|---|---|
older_than: | Older than a period, in days (d), months (m) or years (y) | older_than:2y |
before: | Received before a date, written YYYY/MM/DD | before:2023/01/01 |
larger: | Bigger than a size, attachments included | larger:5M |
has:attachment | Has any attachment | has:attachment |
filename: | Has an attachment of a type or name | filename:pdf |
category: | In an inbox tab, if your inbox uses tabs | category:promotions |
from: | Sent by an address, domain or name | from:example.com |
is:unread | Never opened | is:unread |
-is:starred | Leaves out starred mail (the minus sign excludes) | -is:starred |
has:nouserlabels | Only mail without any of your own labels | has:nouserlabels |
These operators come from Google’s own list of Gmail search operators.
Check these before you delete
- Exclusions work per message. Gmail matches individual messages first, so a conversation can still appear when one message in it is starred. Open long threads before deleting them.
- Receipts and records hide in Promotions. Order confirmations, tickets and warranty emails often land there. Search
category:promotions receiptororderfirst and keep what you need. - Deleting is not archiving. Archived mail still counts toward your storage. To free space, the mail has to be deleted and then leave Trash.
- Stop the flow too. If one sender keeps filling the search, unsubscribe from them in Gmail so the cleanup lasts.
Using these searches on your phone
The Gmail app accepts the same searches. Paste one into the search bar at the top and press search. On Android, Select all picks up to 50 messages at a time (Google), so large cleanups are much faster on a computer. See how to delete multiple Gmail messages on your phone for the phone steps.
Related guides
- How to free Gmail storage while keeping important emails
- How to clean up an email inbox without losing useful records
- A 10-minute weekly email review
Search operators checked against Google’s Gmail Help in November 2026.
Sources
- Gmail Help: Search operators you can use with Gmail
- Gmail Help: Delete messages in Gmail
