equery

From RaySoft

equery is a collection of modules for querying the state of Gentoo packages, files and USE flags.[1]

Documentation

  • man 1 'equery'

Syntax

equery [GLOBAL-PARAMETER ...] SUBCOMMAND [PARAMETER ...]

Subcommands & Parameters

Global parameters
The following parameters can be used with the subcommands below:
-C, --no-color
Do not colorize output.
-q, --quiet
Be less verbose where possible. In some modules, this option can increase the output speed.
list [PARAMETER] PACKAGE
List installed versions of PACKAGE or all packages matching the query pattern.
-d, --duplicates
List only packages with more than one version installed.
uses [PARAMETER] PACKAGE
Display USE flag statuses and descriptions for a given PACKAGE.
-a, --all
Display all package versions. Without this option, equery will choose the best available version.

Examples

Get all USE from all installed packages
for pkg in $(equery --quiet list '*'); do
   equery uses "${pkg}"
done

list

List all installed packages
equery list '*'
List all packages categories which packages are installed from
equery --quiet list '*' | sed 's|/..*$||' | sort --unique
List all duplicates
equery list --duplicates '*'

uses

The usage of USE flags for OpenSSH
equery uses 'openssh'

References

  1. man 1 'equery'