Rebuild mailboxes in Mail on Mac
You may need to rebuild a mailbox to update the list of messages it contains. For example, you may need to rebuild 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.
Go to the Mail app on your Mac.
In the Mail sidebar, select a mailbox.
Choose Mailbox > Rebuild.
When you rebuild mailboxes for IMAP or Exchange accounts, messages and attachments stored on your Mac are discarded, and then downloaded again from the mail server to your Mac. Your mailbox appears empty until the download is complete.