Portageq

portageq is a tool to quickly query Portage information. It is primarily used by Gentoo developers in order to determine Portage configuration information.

Installation
Every Gentoo system should have installed. Run a quick test by issuing the the  option as seen in the usage section below.

If usage instructions are not displayed to the terminal there is certainly a problem. It is possible to (re)install Portage by following the Portage installation instructions.

Invocation
Probably the only question users will have as they read through the help output is the definition of eroot. eroot simply means the repository filesystem path (directory) and can be obtained by:

Query environment variables
Return the CONFIG_PROTECT variable value (should be a filesystem path):

Return the DISTDIR variable value (should be a filesystem path):

Return the PKGDIR variable value (should be a filesystem path):

Query repository information
To see a detailed list of repositories as configured in repos.conf, without any formatting:

Return a list of repositories located in. This should return gentoo and any additional repositories that install to the same directory as the main Gentoo repository:

Removal
Simply put: removing Portage is a bad idea. Do not do it.