Remove duplicate emails from gmail all mail that have been moved to mailbox.org

I have moved my emails that were stored in Gmail over to Mailbox.org using thunderbird.

But before that I have my emails in gmail folders (They call them labels)

However, when I look in inbox in gmail there are only a few emails but if I go to all mail, there are some additional emails that I had moved from Gmail to mailbox.org

So when I look at emails in mailbox.org and all mail in gmail there are some that are the same. Is there a tool or way of scanning all mail in gmail in thunderbird and compare with mailbox.org

Or is it a case of having to go through and manually sort?