I heavily rely on Gmail's category organization. Lately I've started archiving emails that I've looked at already to avoid clutter in my "primary" category.

However I've run into a problem. If I want to look at a recent "primary" email, I can go to All Mail and look through them, but then it's totally cluttered up with all the other emails.

Is there any way to go to All Mail and then filter by category? Or is this just not possible because the categorization is destroyed by the archiving operation?

What I've tried:

  • If I click on All Mail I see all archived messages. If I then use category:primary in the search bar, it resets and only shows me the un-archived primary emails.
  • I've reviewed Gmail's search operators (https://support.google.com/mail/answer/7190?hl=en), but could not find an appropriate entry.

3 Answers 3


you must use NOT label:inbox to get entries that are non more in inbox (ex. archived entries)

it seems that google support search operator page just missed NOT keyword πŸ˜…


If I click on All Mail I see all archived messages. If I then use category:primary in the search bar, it resets and only shows me the unarchived primary emails

  1. No. When you select All Mail you see all messages including, but not limited to, archived messages.
  2. When you next search for messages in Primary, you are requesting a subset of messages from your inbox. Therefore, it follows that you would see a different collection of messages than your all messages search which included not just Primary but all messages in the inbox as well as other labels and categories.


  • If a message is not in the inbox it cannot be searched using Primary because only inbox messages can ever include that category:

    ❌  -in:inbox category:primary   ❌ 
  • It isn't possible to determine definitively what archived messages were originally in Primary because that is dependent on the inbox settings at the time that it was archived. Primary can display messages from categories if the categories inbox tab is not displayed, and even if it was, but the message was starred.

  • One can search for archived messages that are not labeled with certain categories,

    -in:inbox -category:({promotions social updates forums})

    or categorized as personal,

    -in:inbox category:personal

    which may approximate the intended search, but these searches are exactly what they are, and neither is a search for messages that were originally in Primary.

Gmail Documentation Is Limited

Like all Google Web Apps, the documentation is inadequate and, as a result, users are left to make assumptions about functionality that exists and how it works. The saving grace is information that is exposed via the API.

Hopefully the following provides some additional clarity.

Message Categories

  1. Gmail applies message categories to incoming messages automatically.
  2. Users can choose to display categories as inbox tabs by configuring them under Categories in Inbox settings: settingsΒ All settingsΒ >Β Inbox
  3. The categories are defined by Google and can't be renamed, added to, or deleted by users. The current list is:
    1. Primary
      Can't be disabled (grayed out) but will only be an inbox tab if at least one other category is selected.
    2. Personal
      Is not shown in settings and cannot be displayed as an inbox tab. It is applied to most messages that are not placed in other categories.
    3. Promotions
      Used by Gmail to tag promotional content.
    4. Social
      Used to mark messages from social media.
    5. Updates
      Used to mark update-type messages.
  4. With the exception of Primary, all categories have an associated label that is applied to their messages and can be leveraged in searches.
  5. Regardless if a user is displaying category inbox tabs, Gmail will continue to apply category labels to messages behind the scenes.
  6. Messages can be searched using any category that includes a label (all but Primary) regardless if the category is displayed as an inbox tab (Personal never is), and regardless if the messages are in the inbox or not.
  7. When any categories are displayed as tabs, messages labeled with a category for which a tab is not included will instead be included in Primary (for example, Personal always is).
  8. Primary is essentially a collection of all inbox messages that aren't sorted into a category index tab, (or are starred, see #9) and if no categories are shown as inbox tabs, then there is no Primary tab displayed as it would offer little difference to the existing inbox.
  9. If "Include starred in Primary" was selected in settings, Primary will include any starred messages from other inbox tabs and they will continue to include the messages as well.

Searching with Categories

Assumes all the categories (except Personal) are displayed as inbox tabs.

Search ↓ Β  Β  Includes β†’ Inbox All Mail Mylabel Primary Personal Promotions Social Updates
in:inbox βœ… βœ“ βœ“ βœ… βœ“ βœ“ βœ“ βœ“
-in:inbox ❌ βœ“ βœ“ ❌ βœ“ βœ“ βœ“ βœ“
in:all βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
category:primary βœ“ βœ“ βœ“ βœ… βœ“ ❌(βœ“) ❌(βœ“) ❌(βœ“)
category:personal βœ“ βœ“ βœ“ βœ“ βœ… ❌ ❌ ❌
category:promotions βœ“ βœ“ βœ“ ❌(βœ…) ❌ βœ… ❌ ❌
category:social βœ“ βœ“ βœ“ ❌(βœ…) ❌ ❌ βœ… ❌
category:updates βœ“ βœ“ βœ“ ❌(βœ…) ❌ ❌ ❌ βœ…


βœ… ❌ βœ“
Explicitely Included Explicitely Excluded Message Dependent

Where there is a ❌(βœ…) or ❌(βœ“) it indicates that it's explicitly excluded except in the case if the following conditions are both met, then the superscript value will apply:

  1. Inbox tabs must be displayed for some categories.
  2. However, this specific category is not displayed as an inbox tab.

category:primary seems to work differently from the other categories.

For example I can use


and I see both "promotions" emails that are in the inbox and "promotions" emails that have been archived.

To find "primary" emails that have been archived, however, the only way I found is to explicitly exclude all other categories:

NOT category:promotions AND NOT category:social AND NOT category:updates AND NOT category:forums

In both examples above, you can add AND NOT label:inbox to filter out the emails that are in the inbox and only show the emails that have been archived.

Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.