Describe the bug
When an account is deleted via settings, config.RemoveAccount() only removes the account from the config array and deletes the password from the OS keyring. It does not clean up:
- Cached emails in
~/.cache/matcha/folder_emails/
- Cached email bodies in
~/.cache/matcha/email_bodies/
- Contacts associated with that account
- Any draft data for that account
Over time, this accumulates stale data on disk.
To reproduce
- Add an account and fetch emails
- Delete the account from settings
- Check
~/.cache/matcha/ — cached data for the deleted account remains
Expected behavior
Deleting an account should also clean up all associated cache files, or at minimum prompt the user to optionally delete cached data.
OS
All platforms
Describe the bug
When an account is deleted via settings,
config.RemoveAccount()only removes the account from the config array and deletes the password from the OS keyring. It does not clean up:~/.cache/matcha/folder_emails/~/.cache/matcha/email_bodies/Over time, this accumulates stale data on disk.
To reproduce
~/.cache/matcha/— cached data for the deleted account remainsExpected behavior
Deleting an account should also clean up all associated cache files, or at minimum prompt the user to optionally delete cached data.
OS
All platforms