Is there a way to mass-delete everything that I've "archived" (and, ideally, received before X date) while preserving everything that's still in "inbox," regardless of whether it's read/unread?
@hannah you can set up a "search" like that, and then simply "select all", and do delete
@ShadowJonathan i was trying to do that but it looks like you can select "inbox" or "all mail" but not "all mail EXCEPT inbox"

@hannah you can do advanced filters like - and such

Theres advanced search operators for gmail's search, it's not *only* the search fields you get in the form, 1 sec

@hannah https://support.google.com/mail/answer/7190?hl=en

Actually 1 sec wtf there's no match for "inbox" here, did google really not add it

Refine searches in Gmail - Gmail Help

Want to get more out of Google apps at work or school?  

@hannah ah

its not in here, but to exclude the inbox, you can go;

-in:inbox

@ShadowJonathan weirdly that seems to include some stuff that is definitely in my inbox.. `in:archive` seems to work, although I can't combine it with any other operators despite the docs saying I can, and also the "select all" box only selects the 50 currently listed messages, not the entire result set

@hannah  urgh the search include/exclude thing being ignored...

also you can expand the selection of 50 to "all" by clicking the "select all <amount> of messages" when you try to select just 50, at the top bar

@hannah as a fallback, Google Apps Script can almost definitely do it.
@lambda i have been defeated by the web ui so I'm looking into this now, thank you

@hannah

you may be able to apply a label to everything you have archived and from before a cutoff date, and then open your account through an IMAP client that will parse the label as a folder in its ui w/everything grouped together, and then mass-delete by nuking them through that application.

doing this in the gmail web interface is gonna going through the messages one page of results at a time, clicking select all, clicking delete, and then next page.

@jackdaw_ruiz @hannah Seconding this; I would absolutely do this in Thunderbird via IMAP instead of the web interface as it'll almost certainly be easier to get to the selection of messages you want and you don't have to deal with pagination.

@hannah i haven't thought about this for a while, but `is:archive` and `before:[date]` still seem to work.

i _think_ is:archive and is:inbox are mutually exclusive, but, like, check me on that.

@hannah Just look at the emails that you want to read and don't look at the unnecessary ones. Buy 100 GB Google One storage every time you run out of space. Very simple
@katie hey doesn't your instance self-destruct tomorrow
@hannah that would be lovely. Please post if you find this out.
@hannah if you use advanced search for those criteria you can use the select all option (beyond what’s visible on one page), and then delete. It’s not perfect and depending on how many messages meet the criteria you might need to do it multiple times as it times out after partial completion. It is better than the 50 or so on each page though.