LinuxCommandLibrary

paccheck

Verify package file integrity

TLDR

List and check all installed packages

$ paccheck
copy

Check the specified packages
$ paccheck [package1 package2 ...]
copy

Only display messages if a problem is found
$ paccheck --quiet
copy

Check that all package dependencies are satisfied
$ paccheck --depends
copy

Display help
$ paccheck --help
copy

Display version
$ paccheck --version
copy

SYNOPSIS

paccheck [options] [package(s)|group(s)|owner(s)|path(s)]
paccheck -m|-s|-k|-C|-L|-l|-u [options] [package(s)]
paccheck -c [options] [package(s)]
paccheck -g [options] [group(s)]
paccheck -o [options] [owner(s)]
paccheck -p [options] [path(s)]

PARAMETERS

--root <dir>
    Specify an alternative install root directory for the system.

--dbpath <path>
    Specify an alternative database path for Pacman.

--sysroot <dir>
    Specify a system root directory.

-c, --config-files
    Check for configuration files that have been modified by users.

-g, --group <group>
    Check files owned by a specific system group.

-o, --owner <owner>
    Check files owned by a specific system user.

-p, --path <path>
    Check specific file paths or directories.

-m, --modified
    Check for files whose checksums do not match the package database (modified files).

-s, --missing
    Check for files that are present in the package database but are missing from the filesystem.

-k, --permissions
    Check for files with incorrect permissions or ownership compared to the package database.

-C, --config-checksums
    Check checksums specifically for configuration files, regardless of user modifications.

-L, --missing-symlinks
    Check for symlinks whose targets are missing or broken.

-l, --dangling-symlinks
    Check for symlink sources that do not exist (dangling symlinks).

-u, --unowned-files
    Check for files on the filesystem that are not owned by any installed Pacman package.

-v, --verbose
    Show more detailed and verbose output during checks.

-q, --quiet
    Suppress all output except for error messages.

-i, --ignore <path>
    Ignore specific file paths or directories from being checked. Can be used multiple times.

-I, --ignore-pkg <pkg>
    Ignore specific packages from being checked. Can be used multiple times.

--nocolor
    Disable colorized output.

-h, --help
    Display a help message and exit.

-V, --version
    Display version information and exit.

DESCRIPTION

paccheck is a utility from the pacutils collection designed to verify the integrity and ownership of files installed by the Pacman package manager on Arch Linux systems.

It allows users to check for a variety of discrepancies, including files that have been modified since installation (based on checksums), missing files, files with incorrect permissions or ownership, and dangling symlinks. It compares the current state of files on the system against the information stored in Pacman's local package database.

This tool is invaluable for system administrators and users who need to ensure the consistency of their Arch Linux system, detect accidental file changes, or identify potential issues caused by manual modifications or corruption. It can be used to check individual packages, all installed packages, or specific file paths, making it a flexible diagnostic tool for system health.

CAVEATS

paccheck relies entirely on the local Pacman database. It can only verify files that Pacman knows about and cannot detect issues with files created or managed outside of Pacman.

When checking for modified files, it may report 'false positives' for legitimate user modifications to configuration files. Users should carefully review such reports.

Running comprehensive checks on a large system can be resource-intensive and time-consuming.

The tool only reports discrepancies; it does not automatically fix any issues it finds.

<B>MODES OF OPERATION AND COMMON CHECKS</B>

paccheck operates in several distinct modes, determined by the primary checking flag. Using -m (modified), -s (missing), or -k (permissions) allows for a general integrity check for all package files against their database entries. The -c flag specifically focuses on configuration files, highlighting those that users might have intentionally modified. For system-wide audits, -u (unowned files) is invaluable for identifying files not tracked by any installed package. These flags can be combined with package names, group names, owners, or specific paths to effectively target checks, providing a powerful diagnostic suite for maintaining system health.

HISTORY

paccheck is a component of the pacutils project, a collection of command-line tools designed to augment and extend the functionality of the Arch Linux package manager, pacman. It was developed to provide more granular control and deeper inspection capabilities, particularly regarding package file integrity, beyond what pacman itself offers directly. Its development focuses on enhancing system diagnostics and maintenance for Arch Linux users by providing robust checking mechanisms.

SEE ALSO

pacman(8), pacdiff(8), paclog(8), pacutils(7)

Copied to clipboard