1repoquery(1) repoquery(1)
2
3
4
6 repoquery - query information from Yum repositories
7
9 repoquery [options] <item ...>
10 repoquery -a [options]
11
13 repoquery is a program for querying information from YUM repositories
14 similarly to rpm queries.
15
17 --querytags
18 List valid queryformat tags and exit.
19
20 --version
21 Report program version and exit.
22
23 --repoid=<repo>
24 Specify which repository to query. Using this option disables
25 all repositories not explicitly enabled with --repoid option
26 (can be used multiple times). By default repoquery uses whatever
27 repositories are enabled in YUM configuration.
28
29 --enablerepo=<repo>
30 In addition to the default set, query the given additional
31 repository, even if it is disabled in YUM configuration. Can be
32 used multiple times.
33
34 --disablerepo=<repo>
35 Do not query the given repository, even if it is enabled in YUM
36 configuration. Can be used multiple times.
37
38 --repofrompath=<repoid>,<path/url>
39 Specify a path or url to a repository (same path as in a
40 baseurl) to add to the repositories for this query. This option
41 can be used multiple times. If you want to view only the pkgs
42 from this repository combine this with --repoid. The repoid for
43 the repository is specified by <repoid>.
44
45 --plugins
46 Enable YUM plugin support.
47
48 -q, --query
49 For rpmquery compatibility, doesn't do anything.
50
51 -h, --help
52 Help; display a help message and then quit.
53
54 --quiet
55 Run quietly: no warnings printed to stderr.
56
57 --verbose
58 Produce verbose output.
59
60 -C, --cache
61 Tells repoquery to run entirely from YUM cache - does not down‐
62 load any metadata or update the cache. Queries in this mode can
63 fail or give partial/incorrect results if the cache isn't fully
64 populated beforehand with eg "yum makecache".
65
66 --nolock
67 Disable locking the yum cache. This is needed as any yum API
68 caller can alter the repo. metadata cache, unless it is locked.
69 This automatically enables the --cache and --tempcache options,
70 to try to lower the riskiness.
71
72 --tempcache
73 Create and use a private cache instead of the main YUM cache.
74 This is used by default when run as non-root user.
75
76 -c <config file>, --config=<config file>
77 Use alternative config file (default is /etc/yum.conf).
78
79 --releasever=version
80 Pretend the current release version is the given string. This is
81 very useful when combined with --installroot. You can also use
82 --releasever=/ to take the releasever information from outside
83 the installroot. Note that with the default upstream cachedir,
84 of /var/cache/yum, using this option will corrupt your cache
85 (and you can use $releasever in your cachedir configuration to
86 stop this).
87
88 --installroot=root
89 Specifies an alternative installroot, relative to which all
90 packages will be installed. Think of this like doing "chroot
91 <root> yum" except using --installroot allows yum to work before
92 the chroot is created. Note: You may also want to use the
93 option --releasever=/ when creating the installroot as otherwise
94 the $releasever value is taken from the rpmdb within the
95 installroot (and thus. will be empty, before creation).
96
97 --setopt=option=value
98 Set any config option in yum config or repo files. For options
99 in the global config just use: --setopt=option=value for repo
100 options use: --setopt=repoid.option=value
101
102
104 -i, --info
105 Show general information about package similarly to "rpm -qi"
106
107 -l, --list
108 List files in package.
109
110 -R, --requires
111 List package dependencies.
112
113 -R, --weak-requires
114 List package weak dependencies.
115
116 -R, --info-requires
117 List package informational dependencies.
118
119 -R, --weak-reverse-requires
120 List package weak reverse dependencies.
121
122 -R, --info-reverse-requires
123 List package informational reverse dependencies.
124
125 --resolve
126 When used with --requires/--weak-requires/etc, resolve capabili‐
127 ties to originating packages.
128
129 --provides
130 List capabilities package provides.
131
132 --obsoletes
133 List capabilities obsoleted by package.
134
135 --conflicts
136 List capabilities conflicting with package.
137
138 --changelog
139 List package changelog.
140
141 --location
142 Show a location where the package could be downloaded from. For
143 example: wget `repoquery --location yum`
144
145 -s, --source
146 Show package source RPM name.
147
148 --srpm Operate on corresponding source RPM.
149
150 --groupmember PACKAGE
151 List the repodata groups (yumgroups.xml) belongs to (if any).
152
153 --nvr Use name-version-release output format (rpm query default)
154
155 --nevra
156 Use name-epoch:version-release.architecture output format
157 (default)
158
159 --envra
160 Use epoch:name-version-release.architecture output format (eas‐
161 ier to parse than nevra)
162
163 --qf=FORMAT, --queryformat=FORMAT
164 Specify custom output format for queries. You can add ":date",
165 ":day" and ":isodate" to all the tags that are a time, and you
166 can add ":k", ":m", ":g", ":t" and ":h" to sizes. You can also
167 specify field width as in sprintf (Eg. %-20{name})
168
169 --output [text|ascii-tree|ascii-tree+|dot-tree|dot-tree+]
170 Output format which can be used with --requires/--weak-
171 requires/--whatrequires/--obsoletes/--conflicts. The variants
172 with a + suffix are used for weak dependencies and will merge
173 the stronger variants into the output. Default output is
174 'text'.
175
176 --level [all|any int]
177 In combination with --output ascii-tree|dot-tree|ascii-
178 tree+|dot-tree+ this option specifies the number of level to
179 print on the tree.
180 Default level is 'all'.
181
183 -a, --all
184 Query all available packages (for rpmquery compatibility /
185 shorthand for repoquery '*')
186
187 --show-duplicates
188 Query all versions of packages.
189
190 -f, --file FILE
191 Query package owning FILE.
192
193 --whatobsoletes CAPABILITY
194 Query all packages that obsolete CAPABILITY.
195
196 --whatconflicts CAPABILITY
197 Query all packages that conflict with CAPABILITY.
198
199 --whatprovides CAPABILITY
200 Query all packages that provide CAPABILITY.
201
202 --whatrequires CAPABILITY
203 Query all packages that require CAPABILITY.
204
205 --alldeps
206 When used with --whatrequires, look for non-explicit dependen‐
207 cies in addition to explicit ones (e.g. files and Provides in
208 addition to package names). This is the default.
209
210 --exactdeps
211 When used with --whatrequires, search for dependencies only
212 exactly as given. This is effectively the opposite of
213 --alldeps.
214
215 --recursive
216 When used with --whatrequires, and --requires --resolve, query
217 packages recursively.
218
219 --archlist=ARCH1[,ARCH2...]
220 Limit the query to packages of given architecture(s). Valid val‐
221 ues are all architectures known to rpm/yum such as 'i386' and
222 'src' for source RPMS. Note that repoquery will now change yum's
223 "arch" to the first value in the archlist. So "--arch‐
224 list=i386,i686" will change yum's canonical arch to i386, but
225 allow packages of i386 and i686.
226
227 --pkgnarrow=WHAT
228 Limit what packages are considered for the query. Valid values
229 for WHAT are: installed, available, recent, updates, extras, all
230 and repository (default).
231
232 --installed
233 Restrict query ONLY to installed pkgs - disables all repos and
234 only acts on rpmdb.
235
236
238 -i, --info
239 Show general information about group.
240
241 -l, --list
242 List packages belonging to (required by) group.
243
244 --grouppkgs=WHAT
245 Specify what type of packages are queried from groups. Valid
246 values for WHAT are all, mandatory, default, optional.
247
248 --requires
249 List groups required by group.
250
252 -a Query all available groups.
253
254 -g, --group
255 Query groups instead of packages.
256
258 List all packages whose name contains 'perl':
259 repoquery '*perl*'
260
261 List all packages depending on openssl:
262 repoquery --whatrequires openssl
263
264 List all package names and the repository they come from, nicely for‐
265 matted:
266 repoquery -a --qf "%-20{repoid} %{name}"
267
268 List name and summary of all available updates (if any), nicely format‐
269 ted:
270 repoquery -a --pkgnarrow=updates --qf "%{name}:\n%{summary}\n"
271
272 List optional packages in base group:
273 repoquery -g --grouppkgs=optional -l base
274
275 List build requirements from 'anaconda' source rpm:
276 repoquery --requires anaconda.src
277
278 List packages which BuildRequire gail-devel
279 repoquery --archlist=src --whatrequires gail-devel
280 NB: This command will only work if you have repositories
281 enabled which include srpms.
282
283
284
286 Specifying package names
287 A package can be referred to in all queries with any of the fol‐
288 lowing:
289
290 name
291 name.arch
292 name-ver
293 name-ver-rel
294 name-ver-rel.arch
295 name-epoch:ver-rel.arch
296 epoch:name-ver-rel.arch
297
298 For example: repoquery -l kernel-2.4.1-10.i686
299 Additionally wildcards (shell-style globs) can be used.
300
301
303 As repoquery uses YUM libraries for retrieving all the information, it
304 relies on YUM configuration for its default values like which reposito‐
305 ries to use. Consult YUM documentation for details:
306
307 /etc/yum.conf
308 /etc/yum/repos.d/
309 /var/cache/yum/
310
311
313 yum.conf [4m(5)
314 http://yum.baseurl.org/
315
316
318 See the Authors file included with this program.
319
320
322 There are of course no bugs, but should you find any, you should first
323 consult the FAQ section on http://yum.baseurl.org/wiki/Faq and if
324 unsuccessful in finding a resolution contact the mailing list: yum-
325 devel@lists.baseurl.org. To file a bug use http://bugzilla.redhat.com
326 for Fedora/RHEL/Centos related bugs and http://yum.baseurl.org/report
327 for all other bugs.
328
329
330
331
332Panu Matilainen 17 October 2005 repoquery(1)