Gentoo Linux View installed packages
For Gentoo Linux, you need a Equery
software called to view information about installed packages.
Equery
is a Portage
tool used to simplify common operations.
Additionally, package dependencies, metadata, and installed files can be displayed.
how to install:
Equery
is app-portage/gentoolkit
part of a toolset installed using the package:
root # emerge --ask app-portage/gentoolkit
For more information on installation equery
or other tools, visit the Gentoolkit article.
how to use:
introduce:
equery
Is a tool that displays useful information about installed software packages on your system, equery
based on a module system.
Each module has an abbreviated name.
For example, run is the same equery l gcc
as run equery list gcc
.
Calling --help
options( equery --help
) will output the global options and list all available modules with their abbreviated names.
Adding the module name to the end ( equery --help module
) will display help information for that specific module.
The implementation man equery
will also provide detailed descriptions of all available modules and options as well as some useful examples.
Below is a list of features available for most modules.
user $ equery --quiet list gcc
sys-devel/gcc-4.3.2-r3
user $ equery --quiet list sys-devel/gcc
sys-devel/gcc-4.3.2-r3
user $ equery --quiet list '>=sys-devel/gcc-4'
sys-devel/gcc-4.3.2-r3
Same emerge
as, equery
doesn't understand part of the package name:
user $ equery check zilla
!!! No package found matching zilla
Unlike emerge
, similar wildcards equery
can be accepted in category or package names :shell
user $ equery check '*zilla*'
- Checking www-client/mozilla-firefox-3.0.14 ...
90 out of 90 files passed
user $ equery check 'www-c*/*'
- Checking www-client/links-2.2 ...
30 out of 30 files passed
- Checking www-client/mozilla-firefox-3.0.14 ...
90 out of 90 files passed
Most equery
modules accept multiple inputs:
user $ equery hasuse sse sse2
- Searching for USE flag sse ...
[IP-] [ ] media-libs/flac-1.2.1-r3 (0)
[IP-] [ ] media-libs/speex-1.2_beta3_p2 (0)
- Searching for USE flag sse2 ...
[IP-] [ ] dev-libs/openssl-0.9.8k (0)
[IP-] [ ] x11-libs/pixman-0.16.0 (0)
Some modules also allow full regular expressions:
user $ equery -q list --portage-tree --full-regex '[kr]?flickr.*'
dev-dotnet/flickrnet-bin-2.2
dev-ruby/flickr-1.0.2-r1
dev-ruby/flickr-1.0.2-r2
dev-ruby/rflickr-20060201
media-gfx/kflickr-0.6
[...]
Note:
Wildcard support replacesequery
many of the older options in .For example,
To perform an operation on all packages in a collection, use
'*'
(asterisk).To perform an operation on all packages in a category, use
'category-name/*'
.
Warning:
When usingshell
special characters,For example, asterisk or greater than sign, less than sign, etc. Don't forget to surround it with quotation marks.
The different equery
modules are briefly described in the next sections of this document.
Function:
To see equery
the full functionality of , just run it without any parameters:
user $ equery
Gentoo package query tool
Usage: equery [global-options] module-name [module-options]
modules (short name)
(b)elongs list what package FILES belong to
(c)hanges list changelog entries for ATOM
chec(k) verify checksums and timestamps for PKG
(d)epends list all packages directly depending on ATOM
dep(g)raph display a tree of all dependencies for PKG
(f)iles list all files installed by PKG
h(a)s list all packages for matching ENVIRONMENT data stored in /var/db/pkg
(h)asuse list all packages that have USE flag
ke(y)words display keywords for specified PKG
(l)ist list package matching PKG
(m)eta display metadata about PKG
(s)ize display total size of all files owned by PKG
(u)ses display USE flags for PKG
(w)hich print full path to ebuild for PKG
Command alias ( Aliases
)
equery
A common method used is to create a command alias ( ) aliases
.
bash
These aliases ( aliases
) can be placed ~/.bashrc
in files when used :
document ~/.bashrc
alias eqf='equery f'
alias equ='equery u'
alias eqh='equery h'
alias eqa='equery a'
alias eqb='equery b'
alias eql='equery l'
alias eqd='equery d'
alias eqg='equery g'
alias eqc='equery c'
alias eqk='equery k'
alias eqm='equery m'
alias eqy='equery y'
alias eqs='equery s'
alias eqw='equery w'
Find which package a file comes from: belongs
( b
)
user $ equery belongs -e /usr/bin/glxgears
- Searching for /usr/bin/glxgears ...
x11-apps/mesa-progs-7.5.1 (/usr/bin/glxgears)
belongs
Options are available -f
to search for files matching a regular expression.
-e
option stops the search after a match is found, which is a safe operation since no files on the system should be owned by two packages.
belongs
A short version of ( ) can also be used b
.
For example, to list equery
the packages it belongs to:
user $ equery b equery
- Searching for equery ...
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib/python-exec/python2.7/equery)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib64/python3.3/site-packages/gentoolkit/test/equery)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/bin/equery -> ../lib/python-exec/python-exec2)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib64/python2.7/site-packages/gentoolkit/equery)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib/python-exec/python3.3/equery)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib64/python2.7/site-packages/gentoolkit/test/equery)
app-portage/gentoolkit-0.3.0.8-r2 (/usr/lib64/python3.3/site-packages/gentoolkit/equery)
View ChangeLog
entry: changes
( c
)
changes
Allows users to view entries for a specified version or a range of versions of a package ChangeLog
.
Imagine that after running it emerge --sync
, Portage
a message prints out saying that an upgrade is about to happen.
To see what has changed, you can use this command:
user $ equery changes portage
*portage-2.1.6.13 (03 May 2009)
03 May 2009; Zac Medico <[email protected]> +portage-2.1.6.13.ebuild:
2.1.6.13 bump. This fixes bug #268398 (document econf automatic die)
and bug #267104 (handle insufficient space interaction with userfetch).
Bug #268228 tracks all bugs fixed since 2.1.6.11.
Verify package integrity: check
( k
)
Sometimes it is useful to check the integrity of a package.
equery
MD5
You can check whether a package has been corrupted, replaced or deleted by verifying the value and timestamp.
user $ equery check gentoolkit
- Checking app-portage/gentoolkit-0.3.0_rc7 ...
71 out of 71 files passed
List all packages that depend on this package: depends
( d
)
Ever wonder why a certain package has been installed on the system?
equery
can tell which packages list it as a dependency with depends
.
Include indirect dependencies with the -D
option.
Ever wonder why a certain package is installed on your system?
equery
Use depends
to list which packages depend on this package.
Use -D
the option Show indirect dependencies.
user $ equery depends pygtk
- Searching for pygtk ...
app-admin/pessulus-2.24.0 (>=dev-python/pygtk-2.6.0)
app-editors/gedit-2.24.3 (python ? >=dev-python/pygtk-2.12)
dev-libs/libgweather-2.24.3 (python ? >=dev-python/pygtk-2)
dev-python/gnome-python-base-2.22.3 (>=dev-python/pygtk-2.10.3)
dev-python/gnome-python-desktop-base-2.24.1 (>=dev-python/pygtk-2.10.3)
[...]
The second example lists all directly dependent udev
packages:
user $ equery d udev
sys-auth/consolekit-0.4.5_p20120320 (acl ? >=sys-fs/udev-146-r1)
sys-fs/cryptsetup-1.4.1 (>=sys-fs/udev-124)
(>=sys-fs/udev-182[static-libs])
(<=sys-fs/udev-171-r6)
sys-fs/lvm2-2.02.88 (>=sys-fs/udev-151-r4)
virtual/dev-manager-0 (sys-fs/udev)
x11-libs/cairo-1.10.2-r2 (drm ? >=sys-fs/udev-136)
Side note:
This output will includeUSE
optional dependencies controlled by flags,That is,
(acl ? >=sys-fs/udev-146-r1)
in the aboveacl
USE
,Even if the
USE
flag is not activated.If
USE
the flag is active, the package is only a dependency.
Get dependency graph: depgraph
( g
)
depgraph
In depends
contrast, all dependencies of a given package will be found ebuild
(rather than ebuilds that depend on that package).
When a dependency is found, the package's dependencies are searched recursively.
Use --depth
options to control the depth of the tree.
user $ equery depgraph mozilla-firefox
- Searching for mozilla-firefox ...
- dependency graph for www-client/mozilla-firefox-2.0.0.19:
`-- www-client/mozilla-firefox-2.0.0.19 `-- virtual/jre-1.6.0 (virtual/jre) [java]
`-- virtual/jdk-1.6.0 (virtual/jdk-1.6.0*) `-- dev-java/icedtea6-bin (unable to resolve: package masked or removed)
`-- dev-java/sun-jdk-1.6.0.15 `-- dev-java/java-sdk-docs-1.6.0.10 [doc]
`-- app-arch/unzip-6.0-r1 `-- app-arch/bzip2-1.0.5-r1 [bzip2]
`-- sys-libs/glibc-2.9_p20081201-r2 `-- sys-devel/gettext-0.17 [nls]
`-- virtual/libiconv-0 (virtual/libiconv)
[...]
Note that if set java
USE
, jre
it is a direct dependency and jdk
an indirect dependency.
List files installed by a package: files
( f
)
equery
Using files
modules, it is possible to list ebuild
all installed files.
Try --tree
to get an easy-to-read table of contents layout.
Use --filter
Find to specify files of a certain type.
For example, to find where an executable is installed, use --filter=cmd
, or to quickly find where a configuration file is, try using --filter=conf
.
user $ equery files --tree gentoolkit
* Searching for gentoolkit ...
* Contents of app-portage/gentoolkit-0.3.0_rc7:
/etc
> /eclean
+ distfiles.exclude
+ packages.exclude
> /env.d
+ 99gentoolkit-env
> /revdep-rebuild
+ 99revdep-rebuild
/usr
> /bin
+ eclean
+ eclean-dist -> eclean
+ eclean-pkg -> eclean
+ epkginfo
+ equery
+ eread
+ euse
+ glsa-check
+ revdep-rebuild
> /lib
> /python2.6
> /site-packages
> /gentoolkit
+ gentoolkit-0.3.0_rc7-py2.6.egg-info
+ __init__.py
> /equery
+ __init__.py
+ belongs.py
+ changes.py
+ check.py
+ depends.py
+ depgraph.py
+ files.py
[...]
Another example, listing media-sound/ncmpcpp
all installed files:
user $ equery f ncmpcpp
- Searching for ncmpcpp ...
- Contents of media-sound/ncmpcpp-0.5.10:
/usr
/usr/bin
/usr/bin/ncmpcpp
/usr/share
/usr/share/bash-completion
/usr/share/bash-completion/ncmpcpp
/usr/share/doc
/usr/share/doc/ncmpcpp-0.5.10
/usr/share/doc/ncmpcpp-0.5.10/AUTHORS.bz2
/usr/share/doc/ncmpcpp-0.5.10/NEWS.bz2
/usr/share/doc/ncmpcpp-0.5.10/config.bz2
/usr/share/doc/ncmpcpp-0.5.10/keys.bz2
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/ncmpcpp.1.bz2
For descriptions of other modules and command line parameters, please refer to equery
man page
( man equery
).
Look for USE
packages with specific flags: hasuse
( h
)
hasuse
USE
Can be used to find packages with a given flag.
hasuse
Does not indicate whether the flag is enabled;
Just outputs a list with query flags as options ebuild
.
For more tips on obtaining this kind of information, see the Examples section equery
of the man page hasuse
.
user $ equery hasuse qt3 qt4
- Searching for USE flag qt3 ...
[IP-] [ ] app-crypt/pinentry-0.7.5 (0)
[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
- Searching for USE flag qt4 ...
[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
List packages: list
( l
)
list
is a simple but powerful module for listing installed packages in Portage
a tree or .overlay
user $ equery list '*'
- Searching for * ...
[IP-] [ ] app-admin/eselect-1.2.3 (0)
[IP-] [ ] app-admin/eselect-ctags-1.10 (0)
[IP-] [ ] app-admin/eselect-esd-20060719 (0)
[IP-] [ ] app-admin/eselect-fontconfig-1.0 (0)
[IP-] [ ] app-admin/eselect-opengl-1.0.8-r1 (0)
[IP-] [ ] app-admin/eselect-python-20090824 (0)
[IP-] [ ] app-admin/eselect-ruby-20081227 (0)
[IP-] [ ] app-admin/eselect-vi-1.1.5 (0)
[IP-] [ ] app-admin/perl-cleaner-1.05 (0)
[IP-] [ ] app-admin/pessulus-2.24.0 (0)
[IP-] [ ] app-admin/python-updater-0.7 (0)
[IP-] [ ] app-admin/sudo-1.7.2_p1 (0)
[...]
The standard query will search for installed packages by the given package name.
Pass in '*'
all packages in the display collection.
In the leftmost field, you can see that all the above packages are I
(nstalled) and P
(ortage) trees.
Not masked (second field is blank), loaded in default slot
(0).
Use the local option to find packages in Portage
the tree and .overlays
user $ equery list -po vim
- Searching for vim ...
[-P-] [ ] app-editors/vim-7.0.235 (0)
[-P-] [ ~] app-editors/vim-7.0.243 (0)
[-P-] [ ] app-editors/vim-7.1.123 (0)
[-P-] [ ~] app-editors/vim-7.1.330 (0)
[-P-] [ ] app-editors/vim-7.2 (0)
[-P-] [ ~] app-editors/vim-7.2.108 (0)
[IP-] [ ] app-editors/vim-7.2.182 (0)
[-P-] [ ~] app-editors/vim-7.2.238 (0)
[-P-] [ ~] app-editors/vim-7.2.264 (0)
You can see the installed versions 7.2.182
and overlay
there are no available versions in .
~
Users can check which versions have been blocked through the keywords in the second field .
View package metadata: meta
( m
)
Each package in the Portage tree provides at least some metadata about its maintainer etc.
The amount of useful information depends on how the package maintainer decides to provide it.
No options, meta
returns some basic useful information.
user $ equery meta gnucash
- app-office/gnucash [gentoo]
Maintainer: [email protected] (Torsten Veller)
Upstream: None specified
Location: /usr/portage/app-office/gnucash
Keywords: 2.2.9-r1:0: alpha amd64 ppc sparc x86
Keywords: 2.2.9-r2:0:
Keywords: 2.3.8:0:
Keywords: 2.3.10:0: ~alpha ~amd64 ~ppc ~sparc ~x86
Some maintainers provide additional information about packages, which can be very useful:
user $ equery meta --description emacs
- app-editors/emacs
GNU Emacs is an extensible, customizable text editor - and more. At its core
is an interpreter for Emacs Lisp, a dialect of the Lisp programming language
with extensions to support text editing. The features of GNU Emacs include:
- Content-sensitive editing modes, including syntax coloring, for a wide
variety of file types including plain text, source code, and HTML.
- Complete built-in documentation, including a tutorial for new users.
- Support for many languages and their scripts, including all the European
"Latin" scripts, Russian, Greek, Japanese, Chinese, Korean, Thai,
Vietnamese, Lao, Ethiopian, and some Indian scripts.
- Highly customizable, using Emacs Lisp code or a graphical customization
interface.
- A large number of extensions that add other functionality, including a
project planner, mail and news reader, debugger interface, calendar, and
more. Many of these extensions are distributed with GNU Emacs; others are
available separately.
Check the package size: size
( s
)
Ever wondered how much space a specific package takes up?
Since packages can place files in multiple directories, the usual du -hc
command may not give the correct number.
Don’t worry, equery
it can be done!
user $equery size openoffice-bin
* app-office/openoffice-bin-3.1.1
Total files : 4624
Total size : 361.38 MiB
Use size
the option to print the total space used in human-readable units,
and lists the total number of files the package has.
To get the total size in bytes, use --bytes
.
List flags for each package USE
: uses
( u
)
equery
The uses
module can provide information about the flags available for a specific package USE
and which flags are currently enabled.
user $ equery uses gst-plugins-meta
* Searching for gst-plugins-meta ...
[ Legend : U - flag is set in make.conf ]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for media-plugins/gst-plugins-meta-0.10-r2:
U I
+ + X : Adds support for X11
- - a52 : Enables support for decoding ATSC A/52 streams used in DVD
+ + alsa : Adds support for media-libs/alsa-lib (Advanced Linux Sound
Architecture)
- - dvb : Adds support for DVB (Digital Video Broadcasting)
+ + dvd : Adds support for DVDs
+ + esd : Adds support for media-sound/esound (Enlightened Sound Daemon)
+ + ffmpeg : Enable ffmpeg-based audio/video codec support
+ + flac : Adds support for FLAC: Free Lossless Audio Codec
- - mad : Adds support for mad (high-quality mp3 decoder library and cli
frontend)
+ + mpeg : Adds libmpeg3 support to various packages
- - mythtv : Support for retrieval from media-tv/mythtv backend
+ + ogg : Adds support for the Ogg container format (commonly used by
Vorbis, Theora and flac)
- - oss : Adds support for OSS (Open Sound System)
+ + theora : Adds support for the Theora Video Compression Codec
+ + vorbis : Adds support for the OggVorbis audio codec
- - xv : Adds in optional support for the Xvideo extension (an X API for
video playback)
There are many flags enabled in gstreamer
the plugin here ,meta-package
USE
But it can be seen that there are other flags available USE
.
For more information about USE
flags, see Gentoo Handbook
the USE Flags
chapter.
Find ebuild
the path: which
( w
)
which
is a simple script that helps users quickly find ebuild
file paths.
If which
passed an unversioned package name, ebuild
the path to the latest installable version will be returned.
In other words, if typed emerge example/package
, return Portage
will be used ebuild
.
which
Also accepts versioned packages to get the path to that ebuild.
user $ equery which gnome
/usr/portage/gnome-base/gnome/gnome-2.26.3.ebuild
Finally, if none of the equery
above functions provide an answer, try searching manually using which
programs such as :cat
less
grep
ebuild
user $ grep HOMEPAGE $(equery which gentoolkit)
HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml"
Warning: Please note that this currently changes the format of the output
if sent via a pipe .equery
The pipe format is intended to be easier to parse by tools, but can be
--no-pipe
turned off by adding an option.
equery
Be aware of this behavior when writing scripts for use .
See also
Q_applets
-C
A small and fastPortage
auxiliary toolset written in .eix
- A set of utilities for searching and diffing through binary caches, localPortage
trees and .overlays
Gentoolkit
- A set of tools that simplifyGentoo
system administration.