How to cleanup huge mail pile in gmail (how to remove many thousands messages)

If you got few years of LKML subscription in your gmail account, you will find you can not remove 455311 messages at once. You can try, but you will fail with a notice:

Oops… the system encountered a problem (#72830)

You may try to remove them by 100 (50) per time. Fat chance to finish this year.

Hopefully, there is a better way. Use timeslices to select subset of the messages:

1. Click on the label or specify search string.

2. Add time filter. By few attempts I found it is possible (for LKML) to remove about 1 month of the stuff at a time. So, on each attempt shift down ~1 month until done.

I’m writing this at March 2016. So, in my case:

1st fiter: label:linux-lkml after: 2016/02/01. Select all, click “Select all conversations that match this search”, delete, yes, wait.

2nd filter: label:linux-lkml after 2016/01/01, select…, delete.

3rd filter: label:linux-lkml after 2015/12/01

Nth filter: label:linux-lkml after 1970/01/01,…, delete.

If you receive error message, reduce the slice size (I was forced to remove February 2014 with slices of just 5 days long…)

3. After than go to Bin (More -> Bin), and click ‘empty bin’. And wait, like forever.

Eventually you will clean up the mess. It took me about 50 iterations to cleanup 5 years of LKML archives…

Like what you read? Give George Shuklin a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.