pkg_chk verifies that the versions of installed packages matches those in pkgsrc, optionally adding missing or updating mismatched packages. It can verify all installed packages, or check against a set of packages based on the hostname, architecture, and other characteristics.