The correct way is by following these steps http://technet.microsoft.com/en-us/library/dd876883.aspx however If unable to remove using the following steps How to irrevocably rip out public folders (assuming data not required for restore)
Remove Public Folder Database from ADSIEDIT
Remove reference to the public folder in ADSIEDIT