Alex,
IMAP stores all messages on server and can re-download them. Probably the best way will be to create a new data file (PST), copy there all folders and then delete the OST file of IMAP mailbox. Outlook will re-create it after restart and re-download all messages from the server. Mailbox should become normal after that. But some messages could be only in the PST. You can remove duplicates in PSTa тв leave it as Archive.
Using
the Advanced version of the utility you can run deduplicate utility across both stores and select IMAP store as High priority folder. Then it will mark/remove duplicates from PST and leave originals in the IMAP.