pkgadd Cheat Sheet

Solaris uses pkgadd for their installation and removal of packages, similar to rpm on Redhat. Below are some basic pkgadd usage examples.

Install <pkg-file> pkgadd -d <pkg-file>
Remove <pkg> pkgrm <pkg>
Find package which owns <file> pkgchk -l -p <file>
List files in installed <pkg> pkgchk -l <pkg>|awk '/^Pathname/ {print $2}'
List files in <pkg-file> pkgchk -l -d <pkg-file>|awk '/^Pathname/ {print $2}'
List all installed packages pkginfo
Verify integrity of installed files from <pkg> pkgchk <pkg>
Verify integrity of install files from all packages pkginfo|awk '{print $2}'|xargs pkgchk