You may need to rebuild a mailbox to update the list of messages it contains. For example, if messages appear to be missing or garbled, or if you can’t find all relevant messages when you search using the Entire Message search option.
Select a mailbox in the Mail sidebar, then choose Mailbox > Rebuild.
When you rebuild mailboxes for IMAP or Exchange accounts, messages and attachments stored on your computer are discarded, and then downloaded again from the mail server to your Mac. Your mailbox appears empty until the download is complete.