A company I work with uses Gmail to log exception emails from our Ruby on Rails application. This allows us to always capture issues with the application and keep a lengthy history of all the issues without using up disk space on the server itself. Sometimes if there is an issues on a development server that is not fixed right away we may get thousands of emails into the Gmail account that are all the same and it benefits us to clear these out from time to time since they can number over 50,000 at times. The example image below shows our Ruby on Rails application exception inbox from Gmail.
Gmail Exceptions Emails Sent From Ruby Application:
As you can see in the above image there are many of the exact same message in the inbox. In fact there were over 20,000 messages sent from the Ruby application that I needed to delete from the Gmail inbox. Follow the directions below to search for a specific message and then delete all of those messages with a couple key strokes instead of trying to delete 20 at a time from the Gmail search results.
Delete Thousands Of Gmail Messages At The Same Time:
- Open Gmail Search Options: From the Gmail inbox page click on “Show Search Options” which is to the right of the Search field at the top of the list of Gmail messages. Once you click on Show Search Options the below Gmail Search box will appear above the Gmail inbox.
- Enter Search Details: This step is really important so you don’t accidentally delete messages that you do not want to delete. Enter in the search details similar to the below example and then click the Search Mail button to display the Gmail search results.
Again make sure the details entered will only provide results that match the exact emails you want to delete from Gmail.
- Select All Messages: Now click the All link located above the list of search result messages and to the right of “Select”. This will select all of the 20 messages in the list of search results as shown in the below example image.
Keep in mind that when you select “All” it doesn’t mean all of the search results but only the 20 messages displayed in the first page of Gmail search results.
- Select All Search Result Messages: After clicking All the 20 messages on the first page of the search results will be selected but also a link will appear right above the list of messages that is titled “Select all messages that match this search”. Click that link, which is displayed in the example image used in step 3, to select all messages in the search results. After clicking the link the message will change to “All conversations in this search are selected” as shown in the below example image and means you have successfully selected all Gmail search results.
Again keep in mind that you will be blindly deleting many messages so make sure you issued the correct search from within Gmail.
- Delete Gmail Messages: With all of the Gmail search results selected click the Delete button which will open a confirmation pop up message as displayed in the below example image asking you to confirm that you want to delete all of the messages.
- Verify Messages Deleted: Now after confirming that you want to delete all of the search results the Gmail search results will be empty as displayed in the below example image.
- Empty Gmail Trash: You have Gmail configured to automatically empty the trash upon exiting Gmail however you can also visit the Trash folder and manually empty the Trash.
It is easy to miss the link provided by Google at the top of Gmail since you have to select all of the messages on the first page of the Gmail search results. Just make sure that when you issue the search you match only the messages you want to delete since you will not be able to visually verify all of the messages you will be deleting.
Wow! Thanks! It worked!
Hello Ana,
No problem at all. Glad to hear that the article helped you out. Thanks for taking the time to leave feedback.
Thanks.
alex
thanks..good tip that is easy..but sometimes hard to spot..
Hello Steve,
No problem. Glad you found the information useful. Thanks for taking the time to leave feedback regarding the post.
Thanks.
alex
Thank you SO MUCH!!! I have needed this tip so much. Just got rid of thousands of messages I didn’t need in just a couple of minutes. What a blessing! I’m bookmarking this and tweeting it. Thanks again. :)
Hello Kaye Swain-SandwichINK,
No problem. Thanks for leaving feedback with such nice comments!
Thanks.
alex
Awesome!! Thanks for the information
Shane Cauley Wyoming
Hello Shane,
No problem at all. Thanks for taking the time to leave feedback.
Thanks.
alex
Alex,
Are there any other tutorials on managing Gmail?
Thanks,
Shane Cauley
Cheyenne, WY
Hello Shane,
We have written many articles on Gmail and there are tons of tutorials on other sites as well.
Thanks.
alex
thanks a lot for this,
i could not work this out as the “select all within the search” only appears after you select the messages on a page!
all facebook updates gone now :)
Hello radam,
No problem. Thanks for posting feedback.
Thanks.
alex
Wow. . Thank you very much . . You have saved a lot of my time.
Hello Ayubi,
No problem. Thanks for taking the time to leave feedback.
Thanks.
alex
Hi,
Thanks for the help. This didn’t work on my gmail and I’m wondering if there is an updated version of these instructions. I got all the way until the instruction said “select all” I cannot find something on the screen that says “select” and don’t see an “All link”.
Hope you can help,
Again, thank you.
Cami
Hello Cami,
Unfortunately these instructions still work perfect. Make sure you click the down arrow next to the checkbox near the top of the list of emails.
Thanks.
alex
I have been trying to find an answer to this. This doesn’t work for me. I have followed the instructions and know that I’m doing it right. It only deletes the emails page by page and even when I select all conversations it still only deletes that page. I’m wondering if I have an older version of gmail, wrong internet browser or what because it’s frustrating that I see it works for some and not others because I see threads about this all over the internet while I’ve searched for an answer. Thank you for any suggestions you may have although I see this thread is old and may not get an answer.