LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

portageq

Query Gentoo Portage package database

TLDR

Display a Portage environment variable value
$ portageq envvar [VARIABLE]
copy
Show repository configuration
$ portageq repos_config /
copy
List repositories by priority
$ portageq get_repos /
copy
Check if a package is installed
$ portageq has_version / [category]/[package]
copy
Find the best visible version of a package
$ portageq best_visible / ebuild [category]/[package]
copy
Query package metadata
$ portageq metadata / ebuild [category]/[package] [DEPEND]
copy

SYNOPSIS

portageq command [root] [arguments...]

DESCRIPTION

portageq queries Portage configuration and package database on Gentoo Linux. It provides programmatic access to Portage's internal data, useful for scripts and build automation.The tool can retrieve environment variables, repository information, and detailed package metadata without parsing configuration files directly.

PARAMETERS

root

Root directory for queries (usually /)
variable
Environment variable name
category/package
Package atom for queries

COMMANDS

envvar

Display Portage environment variable
repos_config
Show detailed repository configuration
get_repos
List repositories by priority
metadata
Query package metadata
best_visible
Find best visible package version
match
Find packages matching atom
has_version
Check if package is installed. Returns 0 if true, 1 otherwise.
best_version
Return highest installed matching category/package-version.
owners
Query which package owns a file or directory.

CAVEATS

Gentoo-specific tool. Some queries require package to be installed. Root parameter required for most commands. Output format varies by command.

HISTORY

portageq is part of Portage, Gentoo's package management system. It provides a stable query interface for scripts, avoiding direct parsing of Portage's complex configuration.

SEE ALSO

emerge(1), equery(1), eix(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid