A small browser-console helper that repeats the Gmail workflow of selecting the conversations visible on the current page, moving them to Trash, waiting for Gmail to load the next page, and repeating.
No installation or browser extension is required.
- Shows a confirmation before deleting anything.
- Processes only the conversations displayed on the current page, normally 50 at a time.
- Does not click Gmail's Select all conversations link.
- Stops if the Gmail view or search changes.
- Refuses to run in Trash or Spam, where deletion could be permanent.
- Stops if Gmail's Select or Delete controls cannot be identified unambiguously.
- Supports a maximum batch limit and can be stopped with Escape or the Stop button.
Messages are moved to Trash; the script does not permanently erase them. Still, review your Gmail search carefully before starting.
- Open Gmail in Chrome.
- Run a search or open a category containing only conversations you intend to move to Trash.
- Open Chrome DevTools with F12 or Ctrl+Shift+I.
- Select the Console tab.
- Open
gmail-batch-delete-helper.js, review it, and copy the entire file into the Console. - Press Enter. A Gmail batch delete panel will appear in the lower-right corner.
- Set Maximum batches. One batch is normally 50 conversations.
- Click Start, review the confirmation carefully, and approve it.
Start with a maximum of 1 batch to verify the behavior with your Gmail layout before using a larger limit.
Press Escape, click Stop, or click × to remove the panel. The helper finishes any action already in progress and then stops.
You can also stop or remove it from the Console:
GmailBatchDeleteHelper.stop();GmailBatchDeleteHelper.destroy();Confirm that you pasted the complete script into the Console while the active page was mail.google.com. Refresh Gmail and paste the script again if necessary.
Gmail occasionally changes its toolbar markup or event handling. Stop the helper, refresh Gmail, verify that you are using the latest version of the script, and test again with one batch.
Read the message shown in its panel. The helper intentionally stops rather than guessing when it cannot confirm a selection, deletion, or unchanged Gmail view.
- This project is not affiliated with or endorsed by Google.
- Gmail's interface can change, so selectors that work today may need future updates.
- The script operates in the currently signed-in Gmail account and current search or category. Verify both before starting.
- Closing or refreshing the Gmail tab removes the helper.