from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

83310

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tips&Tricks

Using qpkg

This tip demonstrates some basic uses of the "query package" (qpkg) which allows you to perform get information about installed or uninstalled packages on your system. It can be used to find package ownership of files, to find duplicate packages, to list the files installed by a package, and more.

To get qpkg you need to install app-portage/gentoolkit.

Code Listing 1: Installing gentoolkit

# emerge app-portage/gentoolkit

Now that you have qpkg installed, you can start using it to examine your system. The first example is figuring out which package owns which file. This is done with the --find-file (or alternatively --find-pattern option.

Note: To get a complete list of packages and the version installed on your machine use the command qpkg --installed --verbose.

Code Listing 2: Finding the package that owns a file

// Which package owns /etc/crontab? 
% qpkg --find-file /etc/crontab 
sys-apps/vcron * 
 
// What version of vcron? (--verbose) 
% qpkg --find-file --verbose /etc/crontab 
sys-apps/vcron-3.0.1-r1 * 
 
// Where's the ebuild for this file? (--verbose --verbose) 
% qpkg --find-file --verbose --verbose /etc/crontab 
   /var/db/pkg/sys-apps/vcron-3.0.1-r1/vcron-3.0.1-r1.ebuild 
sys-apps/vcron-3.0.1-r1 *

To list all the files a package installed, use the --list option.

Code Listing 3: Listing all the files installed by a package

% qpkg --list units 
// Directories were snipped for brevity 
app-sci/units-1.74 * 
CONTENTS: 
/usr/bin/units 
/usr/share/doc/units-1.74 
/usr/share/doc/units-1.74/README.gz 
/usr/share/doc/units-1.74/NEWS.gz 
/usr/share/doc/units-1.74/INSTALL.gz 
/usr/share/doc/units-1.74/COPYING.gz 
/usr/share/doc/units-1.74/ChangeLog.gz 
/usr/share/man/man1/units.1.gz 
/usr/share/info/units.info.gz 
/usr/share/units/units.dat

The last example shows you how to find which packages depend on a specified package using --query-deps.

Code Listing 4: Finding dependencies

% qpkg --installed --query-deps mozilla 
net-www/mozilla-1.4-r3 * 
DEPENDED ON BY: 
        net-mail/evolution-1.4.3 
        net-www/galeon-1.3.9

Note: Not specifying --installed causes qpkg to look inside the entire Portage tree which is probably not what you want.

This should get you started with qpkg. For more options see qpkg --help or man 1 qpkg.

From http://www.gentoo.org/news/en/gwn/20031006-newsletter.xml

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-02-16
huggingface_hub - 1.3.7
Ebuild name:

sci-ml/huggingface_hub-1.3.7

Description

a client library to interact with the Hugging Face Hub

Added to portage

2026-02-16

librecad - 2.2.2_alpha1_pre20260215
Ebuild name:

media-gfx/librecad-2.2.2_alpha1_pre20260215

Description

Generic 2D CAD program

Added to portage

2026-02-16

rubber - 1.6.7-r1
Ebuild name:

dev-tex/rubber-1.6.7-r1

Description

LaTeX wrapper for automatically building documents

Added to portage

2026-02-16

smb4k - 4.0.6
Ebuild name:

net-misc/smb4k-4.0.6

Description

Advanced network neighborhood browser

Added to portage

2026-02-16

vimpc - 0.09.2_p20230330
Ebuild name:

media-sound/vimpc-0.09.2_p20230330

Description

ncurses based mpd client with vi-like key bindings

Added to portage

2026-02-16

2026-02-15
amarok - 3.3.2-r1
Ebuild name:

media-sound/amarok-3.3.2-r1

Description

Advanced audio player based on KDE Frameworks

Added to portage

2026-02-15

android-studio - 2025.3.1.8
Ebuild name:

dev-util/android-studio-2025.3.1.8

Description

Android development environment based on IntelliJ IDEA

Added to portage

2026-02-15

anydesk - 7.1.4
Ebuild name:

net-misc/anydesk-7.1.4

Description

Feature rich multi-platform remote desktop application

Added to portage

2026-02-15

catalyst - 4.1.1
Ebuild name:

dev-util/catalyst-4.1.1

Description

Release metatool used for creating releases based on Gentoo Linux

Added to portage

2026-02-15

chromium - 145.0.7632.75
Ebuild name:

www-client/chromium-145.0.7632.75

Description

Open-source version of Google Chrome web browser

Added to portage

2026-02-15

createrepo_c - 1.2.2
Ebuild name:

app-arch/createrepo_c-1.2.2

Description

C implementation of createrepo

Added to portage

2026-02-15

etherape - 0.9.21
Ebuild name:

net-analyzer/etherape-0.9.21

Description

A graphical network monitor for Unix modeled after etherman

Added to portage

2026-02-15

filelock - 3.24.0
Ebuild name:

dev-python/filelock-3.24.0

Description

A platform independent file lock for Python

Added to portage

2026-02-15

gcc - 15.2.1_p20260214
Ebuild name:

sys-devel/gcc-15.2.1_p20260214

Description

The GNU Compiler Collection

Added to portage

2026-02-15

gdbus-codegen - 2.86.4
Ebuild name:

dev-util/gdbus-codegen-2.86.4

Description

GDBus code and documentation generator

Added to portage

2026-02-15

gentoo-sources - 6.12.71
Ebuild name:

sys-kernel/gentoo-sources-6.12.71

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-02-15

glib - 2.86.4
Ebuild name:

dev-libs/glib-2.86.4

Description

The GLib library of C routines

Added to portage

2026-02-15

glib-utils - 2.86.4
Ebuild name:

dev-util/glib-utils-2.86.4

Description

Build utilities for GLib using projects

Added to portage

2026-02-15

hsqldb - 2.7.4-r1
Ebuild name:

dev-db/hsqldb-2.7.4-r1

Description

HSQLDB - Lightweight 100% Java SQL Database Engine

Added to portage

2026-02-15

huggingface_hub - 0.36.2-r1
Ebuild name:

sci-ml/huggingface_hub-0.36.2-r1

Description

a client library to interact with the Hugging Face Hub

Added to portage

2026-02-15

huggingface_hub - 1.1.7
Ebuild name:

sci-ml/huggingface_hub-1.1.7

Description

a client library to interact with the Hugging Face Hub

Added to portage

2026-02-15

huggingface_hub - 1.2.4
Ebuild name:

sci-ml/huggingface_hub-1.2.4

Description

a client library to interact with the Hugging Face Hub

Added to portage

2026-02-15

indilib - 2.1.9
Ebuild name:

sci-libs/indilib-2.1.9

Description

INDI Astronomical Control Protocol library

Added to portage

2026-02-15

libgcrypt - 1.12.0-r3
Ebuild name:

dev-libs/libgcrypt-1.12.0-r3

Description

General purpose crypto library based on the code used in GnuPG

Added to portage

2026-02-15

libssh - 0.11.4
Ebuild name:

net-libs/libssh-0.11.4

Description

Access a working SSH implementation by means of a library

Added to portage

2026-02-15

mariadb-connector-odbc - 3.2.8
Ebuild name:

dev-db/mariadb-connector-odbc-3.2.8

Description

MariaDB Connector/ODBC

Added to portage

2026-02-15

mpd - 0.24.8
Ebuild name:

media-sound/mpd-0.24.8

Description

The Music Player Daemon (mpd)

Added to portage

2026-02-15

nh3 - 0.3.3
Ebuild name:

dev-python/nh3-0.3.3

Description

Ammonia HTML sanitizer Python binding

Added to portage

2026-02-15

ninja-mode - 1.12.0
Ebuild name:

app-emacs/ninja-mode-1.12.0

Description

GNU Emacs mode for handling Ninja build files

Added to portage

2026-02-15

ninja-mode - 1.12.1
Ebuild name:

app-emacs/ninja-mode-1.12.1

Description

GNU Emacs mode for handling Ninja build files

Added to portage

2026-02-15

nuitka - 4.0.1
Ebuild name:

dev-python/nuitka-4.0.1

Description

Python to native compiler

Added to portage

2026-02-15

openapi-spec-validator - 0.8.0_beta2
Ebuild name:

dev-python/openapi-spec-validator-0.8.0_beta2

Description

OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0 spec valida

Added to portage

2026-02-15

par2cmdline-turbo - 1.4.0
Ebuild name:

app-arch/par2cmdline-turbo-1.4.0

Description

par2cmdline × ParPar speed focused par2cmdline fork

Added to portage

2026-02-15

pass - 2.0_p20260214
Ebuild name:

app-emacs/pass-2.0_p20260214

Description

Major mode for password-store

Added to portage

2026-02-15

platformdirs - 4.9.1
Ebuild name:

dev-python/platformdirs-4.9.1

Description

A small Python module for determining appropriate platform-specific d

Added to portage

2026-02-15

pmacct - 1.7.9
Ebuild name:

net-analyzer/pmacct-1.7.9

Description

A network tool to gather IP traffic information

Added to portage

2026-02-15

pycxx - 7.2.1
Ebuild name:

dev-python/pycxx-7.2.1

Description

Set of facilities to extend Python with C++

Added to portage

2026-02-15

pytest-django - 4.12.0
Ebuild name:

dev-python/pytest-django-4.12.0

Description

A Django plugin for pytest

Added to portage

2026-02-15

pytest-httpserver - 1.1.5
Ebuild name:

dev-python/pytest-httpserver-1.1.5

Description

HTTP server for pytest to test HTTP clients

Added to portage

2026-02-15

qcoro - 0.13.0
Ebuild name:

dev-libs/qcoro-0.13.0

Description

C++ Coroutine Library for Qt

Added to portage

2026-02-15

tomcat-native - 1.3.6
Ebuild name:

dev-java/tomcat-native-1.3.6

Description

Allows Tomcat to use certain native resources for better performance

Added to portage

2026-02-15

trio - 0.33.0
Ebuild name:

dev-python/trio-0.33.0

Description

Python library for async concurrency and I/O

Added to portage

2026-02-15

typeguard - 4.5.0
Ebuild name:

dev-python/typeguard-4.5.0

Description

Run-time type checker for Python

Added to portage

2026-02-15

vanilla-sources - 6.12.71
Ebuild name:

sys-kernel/vanilla-sources-6.12.71

Description

Full sources for the Linux kernel

Added to portage

2026-02-15

w3m - 0.5.6
Ebuild name:

www-client/w3m-0.5.6

Description

Text based WWW browser, supports tables and frames

Added to portage

2026-02-15

wireless-regdb - 20260204
Ebuild name:

net-wireless/wireless-regdb-20260204

Description

Wireless Regulatory database for Linux

Added to portage

2026-02-15

xl2tpd - 1.3.20
Ebuild name:

net-dialup/xl2tpd-1.3.20

Description

A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon

Added to portage

2026-02-15

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 55.8 ms