Ok, so I've figured out why this happened and how to fix it.
If anyone has a better way, please chime in
The problem:
Apple Mail uses Folders and Gmail uses Labels.
If I move an email from the Inbox to a folder in Apple Mail; the email is moved from the Inbox to that folder.
But in Gmail, the email always resides in All Mail. When Apple Mail tells it to move it to a folder, it doesn't really do it. Instead it just changes its label from Inbox, to the name of that folder.
The effect:
When I do a project, I make a folder that has multiple levels of subfolders.
When the project is done, I move it to On My Mac to make a local archive. Then I delete the entire folder tree in Gmail.
When I do that on my Mac, I get a warning that "All folders and all emails within them will be permanently deleted".
That is true on my Mac, but not in Gmail.
The only thing that has happened in Gmail, is that all those emails are still there, but they no longer has a Label. So finding all the correct emails and deleting them, has now turned in to a nightmare...
The workaround:
- Move the parent folders from On My Mac, back to Gmail (on your Mac). That will not move the folders, but rather make a copy of the Folder/Label structure on your Gmail account.
- Go into each subfolder and delete the emails there.
- Finally; delete the folder structure
In the future I will delete the actual emails before deleting the folders. But this was my solution to the thousands of emails that were unnecessarily maxing out my gmail account. I hope it helps someone else:)