| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- .TH dpkg\-query 1 "2007-03-06" "Debian Project" "dpkg suite"
- .SH NAME
- dpkg\-query \- a tool to query the dpkg database
- .
- .SH SYNOPSIS
- .B dpkg\-query
- .RI [ option "...] " command
- .
- .SH DESCRIPTION
- \fBdpkg\-query\fP is a tool to show information about packages listed in
- the \fBdpkg\fP database.
- .
- .SH COMMANDS
- .TP
- .BR \-l ", " \-\-list " \fIpackage-name-pattern\fP ..."
- List packages matching given pattern. If no \fIpackage-name-pattern\fP
- is given, list all packages in \fI/var/lib/dpkg/status\fP, excluding
- the ones marked with state purge. Normal shell wildchars are allowed
- in \fIpackage-name-pattern\fP. Please note you will probably have to
- quote \fIpackage-name-pattern\fP to prevent the shell from performing
- filename expansion. For example this will list all package names starting
- with \*(lqlibc6\*(rq:
- .T
- .nf
- \fBdpkg\-query \-l \(aqlibc6*\(aq\fP
- .fi
- The output format of this option is not configurable, but varies
- automatically to fit the terminal width. It is intended for human
- readers, and is not easily machine-readable. See \fB\-W\fP (\fB\-\-show\fP)
- and \fB\-\-showformat\fP for a way to configure the output format.
- .TP
- .BR \-W ", " \-\-show " \fIpackage-name-pattern\fP ..."
- Just like the \fB\-\-list\fP option this will list all packages matching
- the given pattern. However the output can be customized using the
- \fB\-\-showformat\fP option.
- The default output format gives one line per matching package, each line
- having the name and installed version of the package, separated by a tab.
- .TP
- .BR \-s ", " \-\-status " \fIpackage-name\fP ..."
- Report status of specified package. This just displays the entry in
- the installed package status database.
- .TP
- .BR \-L ", " \-\-listfiles " \fIpackage-name\fP ..."
- List files installed to your system from \fBpackage-name\fP.
- However, note that files created by package-specific
- installation-scripts are not listed.
- .TP
- .BR \-S ", " \-\-search " \fIfilename-search-pattern\fP ..."
- Search for a filename from installed packages. All standard shell
- wildchars can be used in the pattern. This command will not list
- extra files created by maintainer scripts, nor will it list
- alternatives.
- .TP
- .BR \-p ", " \-\-print\-avail " \fIpackage-name\fP"
- Display details about \fIpackage-name\fP, as found in
- \fI/var/lib/dpkg/available\fP.
- .TP
- .BR \-h ", " \-\-help
- Show the usage message and exit.
- .TP
- .B \-\-version
- Show the version and exit.
- .TP
- .BR \-\-license ", " \-\-licence
- Show the copyright licensing terms and exit.
- .
- .SH OPTIONS
- .TP
- .BI \-\-admindir= dir
- Change the location of the \fBdpkg\fR database. The default location is
- \fI/var/lib/dpkg\fP.
- .TP
- .BR \-f ", " \-\-showformat=\fIformat\fR
- This option is used to specify the format of the output \fB\-\-show\fP
- will produce. The format is a string that will be output for each package
- listed.
- In the format string, \(lq\fB\e\fP\(rq introduces escapes:
- .T
- .nf
- \fB\en\fP newline
- \fB\er\fP carriage return
- \fB\et\fP tab
- .fi
- \(lq\fB\e\fP\(rq before any other character suppresses any special
- meaning of the following character, which is useful for \(lq\fB\e\fP\(rq
- and \(lq\fB$\fP\(rq.
- Package information can be included by inserting
- variable references to package fields using the syntax
- \(lq\fB${\fP\fIfield\fR[\fB;\fP\fIwidth\fR]\fB}\fP\(rq. Fields are
- printed right-aligned unless the width is negative in which case left
- alignment will be used. The following \fIfield\fRs are recognised:
- .T
- .nf
- \fBArchitecture\fP
- \fBBugs\fP
- \fBConffiles\fP
- \fBConfig\-Version\fP
- \fBConflicts\fP
- \fBDepends\fP
- \fBDescription\fP
- \fBEnhances\fP
- \fBEssential\fP
- \fBFilename\fP
- \fBInstalled\-Size\fP
- \fBMD5sum\fP
- \fBMSDOS\-Filename\fP
- \fBMaintainer\fP
- \fBOrigin\fP
- \fBPackage\fP
- \fBPre\-Depends\fP
- \fBPriority\fP
- \fBProvides\fP
- \fBRecommends\fP
- \fBReplaces\fP
- \fBRevision\fP
- \fBSection\fP
- \fBSize\fP
- \fBSource\fP
- \fBStatus\fP
- \fBSuggests\fP
- \fBVersion\fP
- .fi
- The default format string is \(lq\fB${Package}\et${Version}\en\fP\(rq.
- Actually, all other fields found in the status file (i.e. user defined
- fields) can be requested, too. They will be printed as-is, though, no
- conversion nor error checking is done on them.
- To get the name of the dpkg maintainer and the installed version, you could
- run:
- .T
- .nf
- \fBdpkg\-query \-W \-f='${Package} ${Version}\\t${Maintainer}\\n' dpkg\fP
- .fi
- .
- .SH ENVIRONMENT
- .TP
- \fBCOLUMNS\fP
- This setting influences the output of the \fB\-\-list\fP option by changing
- the width of its output.
- .
- .SH AUTHOR
- Copyright 2001 Wichert Akkerman
- .UR mailto:wakkerma@debian.org
- <wakkerma@debian.org>
- .UE
- .sp
- This is free software; see the GNU General Public Licence version 2 or
- later for copying conditions. There is NO warranty.
- .
- .SH SEE ALSO
- .BR dpkg (1).
|