How do you remove the last and only email account remaining in the Mail app? I tried uninstalling and reinstalling it but, the account is still there. Moreover the account cannot be removed via the Accounts pane (Ctrl + M) as the -
is grayed out and not clickable.
3 Answers
Delete mail account folder in ~/.local/share/pantheon-mail/
-
Did some reading prior to posting the question. I actually tried that even before uninstalling the app itself, however it didn't work. Here's a screenshot of the contents of the ~/.local/share folder. Simultaneously, I have the mail app opened showing the inbox of the last account I'm unable to delete. Dec 6, 2019 at 12:53
OK, I managed to get it fixed. I was able to delete the only email account in the mail app by removing the pantheon-mail
package via the terminal using sudo apt-get --remove pantheon-mail
. This change however, was not reflected in the elementary OS AppCenter, as the mail app was still showing up as installed. Upon clicking the Uninstall button I got an error. So I used sudo apt-get -f install pantheon mail
to get the app installed back on the system, and fortunately this resulted in the app being in it's initial state (having no email accounts).
So weird that they don't let you delete an email account if it's the only one. Does anyone know of a logical reason for that?
-
I do not know why it is like that but to avoid a lot of troubles by removing and installing packages it is more safe to do that by deleting the account folder in ~/.local/share/pantheon-mail/ folder, as it is suggested into the other answer. These folders containt a database file and attachments folders only for the account and if you remove them you cannot do any harm to the system but by removing packages using terminal - you can. Because mail is not just one package. Removing last account may be an issue if you are interested you can post one into github.com/elementary/mail/issues Dec 6, 2019 at 19:48
Tried this and didn't have any luck. That stubborn account was still there. I ended up adding another account and removing the problem account. Then, I found that Mail is still not displaying any messages, just the folders and unread counts.