up vote 3 down vote favorite
3
share [g+] share [fb]

In Gmail/Google Apps I can easily find messages either based on their properties (like FROM:/ TO:/ keywords) or based on one or more tags.

Now I have a large number of messages and I know that there must be some messages that have not been tagged at all.

Is there a way of listing these messages so I can tag them?

link|improve this question

50% accept rate
feedback

closed as off topic by random Feb 20 '11 at 17:24

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

3 Answers

up vote 2 down vote accepted

Unfortunately if you check Using advanced search you will see under label it says

There isn't a search operator for unlabeled messages.

One possibility to find them would be to do the following:

  • move all the mail to inbox
  • select each label, select all messages, archive them by selecting More options -> Archive
  • repeat for each label and you should end up with only unlabeled mails in the inbox

Of course if you have a huge number of mails this could take a while but since you said you have hundreds of labels searching by excluding is probably impossible.

link|improve this answer
Thanks for pointing me to the note in the advanced manual and for giving a workable solution to what I want. – Niels Basjes Oct 8 '09 at 7:26
feedback

Only way I know of is to do a search like

-label:label1 -label:label2 ... -label:labelN

But if you have a lot of labels that would really be a pain in the butt.

Edit: I found this Greasemonkey script which looks like it would work. There are some more options on this page.

link|improve this answer
I got a little over 100 labels .... – Niels Basjes Oct 7 '09 at 20:50
Ya, it wouldn't have worked for me either. I have 60-70 labels. I added some more options. – djhowell Oct 7 '09 at 20:59
feedback

This happens a lot if you use google exchange sync to get gMail on your iPhone. If you use the iPhone Mail app to delete a message, it actually just removes the Inbox tag, but doesn't move the message to the bin. It is still visible in All Items.

If you want to actually delete the messages, you need to find them first.

I followed the above links, and installed this greasemonkey script (into firefox). I also had to disable the Better GMail firefox add-on to get the script to work.

I then had a new link on the left in gMail - 'Unlabelled'. This opened a search for all messages not tagged with any of my labels. I had to edit this search to remove mails in my Inbox - I added '-label:Inbox' to the end of the search box.

Finally I noticed that some mails picked up in this search were actually tagged after all. This happens if you use your iPhone to delete a single message from a conversation - gMail finds the single message matching the search, but brings the whole converstaion into the results. To get round this I ran the modified Unlabelled search, then selected all messages and tagged them 'Untagged'. I then pasted the search string into a text editor and replaced '-label:' with 'OR label:'. I removed the leading OR and wrapped the whole lot in brackets, then tailed it with label:Untagged. This search finds everything tagged with any label, and with Untagged - remove the Untagged label from anything in this search. Finally delete everything matching the Untagged label.

It's easier than it sounds!

Original Unlabelled search-string

-label:Label1 -label:Label2 ...

Modified to remove messages in the Inbox - tag everything matching this search 'Untagged'

 -label:Label1 -label:Label2 ... -label:Inbox

After Find/Replace to find anything with a label AND the Untagged label - remove Untagged label from any matches

(label:Label1 OR label:Label2 OR ... OR label:Inbox) label:Untagged

Finally, delete everything matching this search

label:Untagged
link|improve this answer
feedback

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