A Thunderbird add-on that adds one toolbar button to permanently delete everything in your Spam/Junk and Trash folders, across all accounts.
- Finds every real Junk and Trash folder in every account. Unified and virtual folders are skipped, so nothing is counted twice.
- Shows how many messages are in each folder before anything is deleted.
- Asks for confirmation with a second click before deleting.
- Deletes permanently. Messages do not go back into Trash.
| Thunderbird | Status |
|---|---|
| 153 ESR / current release | ✅ |
| 140 ESR | ✅ |
| 128 ESR | ✅ |
| 127 and older | ❌ (needs the folders.query API from 128) |
- Download the latest
empty-spam-trash-*.xpifrom the Releases page. - In Thunderbird, open Tools → Add-ons and Themes.
- Click the gear icon, choose Install Add-on From File…, and select the
.xpi.
- Clone this repository.
- In Thunderbird, open Tools → Developer Tools → Debug Add-ons.
- Click Load Temporary Add-on… and select
manifest.json.
- Click the Empty Spam & Trash button in the toolbar.
- Check the list of folders and message counts.
- Click Delete all permanently, then click again to confirm.
⚠️ Deletion is permanent and cannot be undone. Make sure there is nothing in Spam or Trash that you want to keep.
| Permission | Why it is needed |
|---|---|
accountsRead |
To list your accounts and find their Junk and Trash folders |
messagesRead |
To count and list messages in those folders |
messagesDelete |
To delete the messages |
The add-on makes no network requests and collects no data.
./build.shThis creates two identical archives:
dist/empty-spam-trash-<version>.zip: upload this to addons.thunderbird.net.dist/empty-spam-trash-<version>.xpi: install this directly in Thunderbird.
Update version in manifest.json and add an entry to CHANGELOG.md. Then build and publish:
./build.sh
git tag v1.1.0 && git push origin v1.1.0
gh release create v1.1.0 dist/empty-spam-trash-1.1.0.xpi dist/empty-spam-trash-1.1.0.zip --title v1.1.0 --notes-file <(sed -n '/^## 1.1.0/,/^## /{/^## /!p}' CHANGELOG.md)GPL-3.0-or-later © 2026 dschaefer79