When you try to uninstall Exchange 2007 from your server, you may receive some error messages which indicate that there is still some Public Folder on the machine thus meaning the uninstall process fails. We have received a lot of these issues recently. It is caused by the Exchange 2007 server containing some public folder replicas. We should remove the replicas as well as the public folder store before we can uninstall Exchange 2007 properly.
For the detailed steps to remove public folder replicas and the public folder store, please refer to the following article.
How to remove Exchange 2007 from a computer