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.

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

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 all repositories located in the repository filesystem path. This should return gentoo and any additional repositories that install to the same repository filesystem path as the main Gentoo repository:

Removal
Simply put, removing the package management system on Gentoo is a bad idea. Do not do it!