qpkg, the Gentoo query package tool

The qpkg utlity is part of the Gentoo’s Gentoolkit administration scripts. qpkg allows you to manage the packages installed on your box. This tip will show you how to achieve common tasks using this utility.

Let’s start by some basic usage of qpkg:

Show me all installed packages and its versions:

qpkg -I -v

Show me all uninstalled packages and its versions:

qpkg -U -v

Show me installed packages belonging to category net-misc:

qpkg -I -v -g net-misc

Give me some descriptive information related to the package snort:

qpkg -i snort

Show me all packages belonging to category net-misc:

qpkg -g net-misc

Note that packages marked with an “*” denote installed packages.

List the content of a given package:

qpkg -l snort

Let me know what package netstat belongs to:

qpkg -f `which netstat`

Note that for this to work you must provide the full path to the file you are interested on, hence which netstat.

Show me duplicate packages on my box and some extra info:

qpkg -d -vv

Let me know what packages depend on, say, mysql:

qpkg -q mysql

Verify mysql and do not hesitate to show verbose info:

qpkg -c -v mysql

References:

  • man qpkg

Leave a Reply

You must be logged in to post a comment.