pkg_check — check
consistency of installed packages
pkg_check verifies as much information as
it can about installed packages.
pkg_check is not needed under normal
circumstances, but it can be used to recover after a catastrophic system
failure in the middle of a pkg_add(1) or
pkg_check performs the following
- Packing-list sanity
- Checks that /var/db/pkg only contains directories,
that each directory holds a packing-list, and that said packing-list is an
actual packing-list that matches the directory.
- Direct dependencies
- Checks that all direct dependencies are recorded correctly, specifically,
match actual packages. It currently does not verify that
@wantlib are reachable from the base package.
- Reverse dependencies
- Checks that all direct dependencies have corresponding reverse
- Files from packages
- Checks that each file, link or directory in those packing-lists actually
exist, and that their checksum matches what's recorded in the
- Other files (option
- Checks that there are no other random objects under
pkg_check will only perform
very safe transformations, such as the removal of core-dumps.
pkg_check will ask the user for more permanent
changes in interactive mode, or perform them anyway with option
The options are as follows:
- Extra options. Recognized keywords include:
- Do not check digital signatures.
- Check the filesystem for random objects.
- Force the removal of bogus package information.
- Force non-interactive mode. Default is to be interactive when run from a
- Force interactive mode, even if not run from a tty.
pkg_check to always display the progress
meter in cases it would not do so by default.
- Don't actually modify packages, just perform checks.
- Don't verify checksums for files, just check for their existence. Doubling
-q will bypass that check entirely.
- Turn on verbose output. Several
-v may turn on
more verbose output.
- Disable progress meter.
This program was written by Marc
Work in progress. The order of checks is not definitive, and more
checks may be added. Use with caution.