First, find package in /Library/Receipts and find the bom-file: /Library/Receipts/<PACKAGE>/Contents/Archive.bom. The bom-file contains information about the packages installed files. OSX ships with two tools to handle bom-files, mkbom and lsbom. To uninstall a .pkg package you can use lsbom to list all files installed and batch remove them by piping to xargs rm or similar.
Shell: List files installed by a package
Shell: Remove all files