pacman-deptest
Test package dependencies without installing it
TLDR
Print the package names of the dependencies that are not installed
Check if the installed package satisfies the given minimum version
Check if a later version of a package is installed
Display [h]elp
SYNOPSIS
pacman-deptest [options] package|package_file|url
PARAMETERS
-d <database>
Specify an alternative database path instead of the default /var/lib/pacman. This allows testing against a different set of packages.
-i
Ignore missing dependencies. This option tells pacman-deptest not to report dependencies that are completely absent, focusing only on version conflicts or unmet requirements for present dependencies.
-s
Show satisfied dependencies. By default, pacman-deptest only shows unsatisfied dependencies. This option makes it list all dependencies, indicating which ones are satisfied.
-p
Check if a package provides a dependency. This is useful for packages that provide a virtual dependency (e.g., virtual-display-manager might be provided by xorg-server).
-q
Suppress output for satisfied dependencies. This option is often used with -s to get a cleaner list, or alone to only get an exit code.
-h, --help
Show a help message and exit.
-V, --version
Show version information and exit.
DESCRIPTION
pacman-deptest is a diagnostic tool for Pacman, primarily used to verify the dependencies of a specific package. It checks whether all required dependencies for a given package are satisfied by other packages either currently installed on the system or present in a specified package database.
This utility is invaluable for package maintainers to ensure their packages correctly declare dependencies and for users to diagnose dependency-related installation failures. It can operate on an installed package name, a local package file (like a .pkg.tar.zst), or a URL to a package file. The command reports missing or unsatisfied dependencies, helping to identify conflicts or prerequisites that are not met. Its exit code indicates success (0 for all dependencies met) or failure (non-zero for unsatisfied dependencies).
CAVEATS
pacman-deptest relies on the local Pacman database or a specified database. If the database is outdated or corrupted, the results may be inaccurate.
It does not perform actual installation or resolution; it only checks dependencies against an existing state.
It's primarily a shell script wrapper around pacman's database queries, meaning it might not be as performant as a native binary for very large datasets.
It doesn't resolve transitive dependencies beyond the immediate ones of the specified package.
EXIT STATUS
The command returns an exit status that can be used in scripts:
0: All dependencies are satisfied.
1: One or more dependencies are unsatisfied.
2: An invalid option or package argument was provided.
USAGE EXAMPLES
To check dependencies for an installed package:
pacman-deptest firefox
To check a local package file against a specific database:
pacman-deptest -d /path/to/custom_db coreutils.pkg.tar.zst
To show all dependencies, including satisfied ones:
pacman-deptest -s mesa
HISTORY
pacman-deptest is an integral part of the Pacman package manager suite, originally developed by Judd Vinet for Arch Linux. Its evolution has closely mirrored that of Pacman itself, adapting to new features and changes in dependency resolution within the Pacman ecosystem. It serves as a specialized diagnostic tool for package maintainers and advanced users, embodying Pacman's philosophy of providing granular control and detailed information about package states.
SEE ALSO
pacman(8), pacman-query(8), pactree(8)