mailtrim
mailtrim is a free Linux command-line tool for finding and cleaning up inbox clutter.
What mailtrim is
mailtrim is a free Linux command-line tool for finding and cleaning up inbox clutter. It ranks senders by the storage their email uses, then lets you bulk-delete messages from selected senders or a sender domain. A dry-run preview shows what a purge would remove before you confirm it, and deleted messages go to Trash, where they can be restored for up to 30 days. It works with Gmail and IMAP services, including Outlook, Fastmail, iCloud, and self-hosted servers. Gmail setup uses OAuth; IMAP setup accepts server credentials and keeps the password out of local storage. Optional AI features provide inbox triage, natural-language bulk actions, and weekly digests, and are off by default. If AI uses Anthropic, subjects, sender details, and snippets are sent, but not full message bodies or attachments. The privacy policy says tokens, metadata, and undo logs are stored locally and that there is no analytics, crash reporting, or usage tracking. mailtrim is MIT-licensed; its threat model covers single-user local use, not multi-user or server deployment.
Good
- Ranks senders by storage impact, not just message count.
- Previews bulk deletions before confirmation.
- Deleted messages can be restored for up to 30 days.
- AI features are optional and off by default.
- No analytics, crash reporting, or usage tracking.
Watch out
- Linux platform only.
- Multi-user and server deployment threats are out of scope.
- Cloud AI sends subjects, sender details, and snippets to Anthropic.
Who it suits
mailtrim suits Linux users who want command-line control over inbox cleanup across Gmail or IMAP services. Its single-user local design is not intended for multi-user or server deployment.
Verdict
mailtrim offers sender-focused cleanup, a preview before deletion, and a 30-day Trash recovery window. Consider its Linux-only, single-user local scope and the data sent when optional Anthropic AI is used.
Plans and prices
From mailtrim's own pricing page, checked 8 Oct 2001.
| Plan | Price | What it gives you |
|---|---|---|
| Free | Free | No subscription · no API key required for core commands |
The facts
Each one read from mailtrim's own pages, with the date it was checked.
What it does
- AI data
- When cloud AI is used, email subjects, sender details, and snippets are sent to Anthropic; full message bodies and attachments are not sent.checked 8 Oct 2001
- AI features
- Optional AI features include inbox triage, natural-language bulk operations, and weekly digests; AI is off by default.checked 8 Oct 2001
- Authentication
- Gmail setup uses OAuth, while IMAP setup accepts server credentials and keeps the password out of local storage.checked 8 Oct 2001
- Bulk cleanup
- The purge command can bulk-delete emails from selected senders or target a sender domain.checked 8 Oct 2001
- Cleanup
- It ranks senders by storage impact and supports bulk cleanup, including deleting 300+ emails from one sender in a single command.checked 8 Oct 2001
- Cloud AI data
- When AI features use Anthropic, the tool sends email subjects, sender names or addresses, and snippets, but not full email bodies or attachments.checked 8 Oct 2001
- Email providers
- It works with Gmail and IMAP services, including Outlook, Fastmail, iCloud, and self-hosted IMAP servers.checked 8 Oct 2001
- License
- The repository describes mailtrim as MIT-licensed and free to use, modify, and distribute.checked 8 Oct 2001
- Local data
- The privacy policy says email metadata, undo logs, and related data are stored locally, and full email bodies are never stored locally or sent anywhere.checked 8 Oct 2001
- Local storage
- The privacy policy says OAuth tokens, metadata cache, undo logs, rules, and unsubscribe history are stored locally under ~/.mailtrim/.checked 8 Oct 2001
- Purpose
- mailtrim is a command-line tool for finding and cleaning up inbox clutter.checked 8 Oct 2001
- Safety preview
- The purge command supports a dry-run preview of what would be deleted before confirmation.checked 8 Oct 2001
- Security limitation
- The threat model describes mailtrim as a single-user local CLI and says multi-user or server deployment threats are out of scope.checked 8 Oct 2001
- Sender ranking
- It ranks senders by storage impact, rather than only by message count.checked 8 Oct 2001
- Support
- The README directs users to GitHub Issues for bug reports and feature requests.checked 8 Oct 2001
- Telemetry
- The privacy policy says mailtrim has no analytics, crash reporting, or usage tracking.checked 8 Oct 2001
- Undo
- Deleted messages go to Trash and can be restored for up to 30 days.checked 8 Oct 2001
Alternatives to mailtrim
- 1

Clean Email
Free planAndroidiOSWebmacOS8.0From $2.50 a month - 2
Paperweight
Free planOpen sourceLinuxmacOSWindows7.8From $4.58 a month - 3
Gmail Unsubscriber
Free planOpen sourceAndroidiOSWeb7.7Free plan - 4
InboxSweeper
Free planOpen sourceWebLinuxmacOSSelf-hosted7.4Free plan - 5
Cleanfox
Free planAndroidiOSWeb7.3Free plan - 6
Gmail Unsubscribe
Free planWebAPIExtension7.2From $2.99 a month
