Freedom251 › Email Cleanup Software
Gmail Cleanup

What Gmail Cleanup is
Gmail Cleanup is a free, open-source Google Apps Script for cleaning promotions, newsletters, and marketing emails from Gmail. By default, it unsubscribes from promotions and newsletters older than one day and moves them to Trash; it also moves spam to Trash. Trash items remain recoverable for 30 days, rather than being permanently deleted by default. The script looks at Gmail’s Promotions category, newsletter subject and label patterns, and sender patterns such as noreply and marketing. It reads List-Unsubscribe headers and supports one-click HTTP and mailto methods. Users can exclude senders from cleanup or unsubscribe while keeping their messages. Setup uses Google Apps Script, the Gmail API, and a Google Sheet in Drive for logs and editable sender lists. A dry run previews actions, and optional triggers can run daily cleanup and an unsubscribe pass every three days. Sender-pattern searches may catch legitimate transactional email, so the project recommends excluding domains and previewing actions first.
Who it suits
It suits Gmail users who want to automate removal and unsubscribing for older promotions and newsletters, while reviewing proposed actions and managing sender exclusions.
What it does well
- Free and open source under the MIT license.
- Dry-run mode previews cleanup actions.
- Trash items remain recoverable for 30 days.
- Supports sender exclusions and unsubscribe-only lists.
- Optional triggers automate cleanup.
What to know first
- Supports Gmail only.
- Setup requires Google Apps Script and the Gmail API.
- Sender searches may match legitimate transactional messages.
Limits
Sender-pattern searches may match legitimate transactional messages, so the project recommends excluding domains and using dryRun first. Messages moved to Trash remain recoverable for 30 days rather than being permanently deleted by default.
Getting started
- Open the Gmail Cleanup project website
- Create a project in Google Apps Script
- Enable the Gmail API
- Create the Google Sheet in Google Drive for logs and sender lists
- Run a dry run to preview proposed actions
- Edit excluded-sender or unsubscribe-only lists as needed
- Add optional time-based triggers for daily cleanup and three-day unsubscribe passes
Verdict
Gmail Cleanup offers configurable Gmail cleanup with previewing, logging, and recoverable Trash. Its sender-pattern matching can catch legitimate messages, so review the dry run and exclude relevant domains before automation.
Questions
Is Gmail Cleanup free?
Yes. It is free, open source, and listed under the MIT license.
Which email service does it support?
It supports Gmail and runs as a Google Apps Script through the web.
What does the default cleanup do?
It unsubscribes from and moves Promotions and newsletters older than one day to Trash, and moves spam to Trash.
Can I protect specific senders?
Yes. You can exclude senders from cleanup or unsubscribing while keeping their emails, using editable lists in the script or Google Sheet.
Does it preview and record actions?
A dry-run mode previews proposed actions. A Google Sheet records unsubscribe attempts and skipped senders.
Can cleanup run automatically?
Optional time-based triggers can run cleanup daily and an unsubscribe pass every three days.
Facts from Gmail Cleanup's own pages
- Automation
- Optional time-based triggers can run cleanup daily and unsubscribe every three days. · github.com, 11 Oct 2026
- Cleanup
- By default, it unsubscribes from and moves promotions and newsletters older than one day to Trash, and moves spam to Trash. · github.com, 11 Oct 2026
- Default actions
- By default, it unsubscribes and moves promotions and newsletters older than one day to Trash, and moves spam to Trash. · github.com, 4 Oct 2026
- Detection
- It targets Gmail's Promotions category, newsletter subject or label patterns, and sender patterns such as noreply and marketing. · github.com, 11 Oct 2026
- Integration
- Setup instructions require creating a project in Google Apps Script and enabling the Gmail API; the script also uses Google Sheets and Drive. · github.com, 11 Oct 2026
- Integrations
- Setup uses Google Apps Script, the Gmail API, and a Google Sheet created in Google Drive for logs and editable sender lists. · github.com, 4 Oct 2026
- License
- The repository is distributed under the MIT license. · github.com, 11 Oct 2026
- Limit
- The README warns that sender-pattern searches may match legitimate transactional messages and recommends excluding domains and running dryRun first. · github.com, 4 Oct 2026
- Logging
- The script creates a Google Sheet that records unsubscribe attempts and skipped senders, and provides editable excluded-sender and unsubscribe-only lists. · github.com, 11 Oct 2026
- Notable limit
- The README cautions that sender-pattern searches can match legitimate transactional email and recommends whitelisting domains and running dryRun first. · github.com, 11 Oct 2026
- Preview
- A dry-run mode previews what would be deleted before cleanup runs. · github.com, 11 Oct 2026
- Preview and logging
- Dry-run mode previews actions, and unsubscribe attempts are logged in a Google Sheet. · github.com, 4 Oct 2026
- Protection
- Keyword detection in English and Spanish is used to protect potentially important health, government, immigration, legal, education, and transactional emails in ambiguous searches. · github.com, 11 Oct 2026
- Purpose
- Gmail Cleanup is a Google Apps Script for automated Gmail inbox cleanup and mass unsubscribe. · github.com, 11 Oct 2026
- Recoverability
- The README says messages moved to Trash are recoverable for 30 days and permanent deletion is off by default. · github.com, 11 Oct 2026
- Sender controls
- Users can exclude senders from cleanup or unsubscribe from them while keeping their emails, using script settings or Google Sheet tabs. · github.com, 11 Oct 2026
- Unsubscribe
- It parses List-Unsubscribe headers and supports HTTP one-click and mailto unsubscribe endpoints. · github.com, 11 Oct 2026
Where Gmail Cleanup stands on Freedom251
- Email Cleanup Software#18 of 31