Skip to content
Josh Kenney
Go back

Google Is Quietly Cutting Off Your Email — Here's How to Fight Back

Gmail inbox overflowing with unread email

Google quietly turned your inbox into a subscription.

Back in 2013, Google stopped the era of ever-expanding free storage. Then on June 1, 2021, they dropped the hammer: unlimited “High Quality” photo backups ended, and Gmail, Drive, and Photos were merged into a single shared 15 GB cap. Upload a photo, lose inbox space. Get a big attachment, lose Drive space. Hit the limit and — this is the part people don’t realize — Google starts blocking your incoming emails.

The whole thing is a funnel into Google One, their paid storage subscription. And it works, because most people don’t know there’s another option.

There is. If your inbox is bloated with years of promotional emails, newsletters, and notifications you never asked for, you don’t need to buy more storage. Delete the junk. Google Apps Script can wipe everything matching a search query in one shot. Here’s how:

  1. Go to script.google.com
  2. Create a new project
  3. Paste this code:
function deleteMsgs() {
  var threads = GmailApp.search('category:promotions is:unread', 0, 500);
  
  for (var i = 0; i < threads.length; i++) {
    threads[i].moveToTrash();
  }
  
  // If we got a full batch, there's probably more — schedule another run
  if (threads.length === 500) {
    scheduleNextRun();
  } else {
    // Done — clean up any lingering triggers
    deleteExistingTriggers();
  }
}

function scheduleNextRun() {
  deleteExistingTriggers(); // avoid stacking duplicates
  ScriptApp.newTrigger('deleteMsgs')
    .timeBased()
    .after(1000) // 1 second delay
    .create();
}

function deleteExistingTriggers() {
  var triggers = ScriptApp.getProjectTriggers();
  for (var t = 0; t < triggers.length; t++) {
    if (triggers[t].getHandlerFunction() === 'deleteMsgs') {
      ScriptApp.deleteTrigger(triggers[t]);
    }
  }
}
  1. Save and click Run

That’s it. It processes everything matching the query at once and moves it to trash.

A few notes

This approach works for any bulk Gmail cleanup job — old newsletters, order confirmations, notifications from services you no longer use, etc. Just adjust the search query.


Sources


Share this post on: