Microsoft has provided scripts to help with Public Folder management, in the event you need to remove a Public Folder Database from replication to the scripts directory of your installation path for Exchange.
Example: C:\Program File\Microsoft\Exchange Server\V14\scripts
Run the following:
.\RemoveReplicaFromPFRecursive.ps1 -TopPublicFolder “\” -ServerToRemove “NameofYourMailboxServer”
This will take some time to replicate. Once complete run the follow command to verify that all Public Folder replicas have been removed from this Public Folder Database.
Get-PublicFolder -Recurse | ft Name,ParentPath,Replicas
The replica for the given Public Folder Database should be removed. You can then proceed with removing the Public Folder Database.
Remove-PublicFolderDatabase “Name of your “PublicFolderDatabase”