OSX/Pkg packages

From Sidvind
Jump to: navigation, search

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

lsbom Archive.bom -f -l -s Archive.bom

Shell: Remove all files

lsbom -f -l -s -pf Archive.bom | (cd /; xargs -n 1 rm)