Locate the.msf files that correspond to the folders you want to rebuild and move them to the trash.
IMAP accounts are in the ImapMail folder POP accounts are found under Mail/Local Folders. Open your Mozilla Thunderbird profile directory on your computer and select the desired account's data folder.