1OPAM ADMIN-LIST(1) Opam admin Manual OPAM ADMIN-LIST(1)
2
3
4
6 opam admin-list - Lists packages from a repository
7
9 opam admin list [--environment=VAR=VALUE[;VAR=VALUE]] [--no] [--yes]
10 [OPTION]… [PATTERNS]…
11
13 This command is similar to 'opam list', but allows listing packages
14 directly from a repository instead of what is available in a given opam
15 installation.
16
18 PATTERNS
19 Package patterns with globs. matching against NAME or NAME.VERSION
20
22 --environment=VAR=VALUE[;VAR=VALUE]
23 Use the given opam environment, in the form of a list of
24 comma-separated 'var=value' bindings, when resolving variables.
25 This is used e.g. when computing available packages: if undefined,
26 availability of packages will be assumed as soon as it can not be
27 resolved purely from globally defined variables. Note that, unless
28 overridden, variables like 'root' or 'opam-version' may be taken
29 from the current opam installation. What is defined in
30 ~/.opam/config is always ignored.
31
32 --no
33 Answer no to all opam yes/no questions without prompting. See also
34 --confirm-level. This is equivalent to setting $OPAMNO to "true".
35
36 -y, --yes
37 Answer yes to all opam yes/no questions without prompting. See also
38 --confirm-level. This is equivalent to setting $OPAMYES to "true".
39
41 -a, --available
42 List only packages that are available according to the defined
43 environment. Without --environment, this will include any packages
44 for which availability is not resolvable at this point.
45
46 -A, --all
47 Include all, even uninstalled or unavailable packages
48
49 --coinstallable-with=PACKAGES
50 Only list packages that are compatible with all of PACKAGES.
51
52 --conflicts-with=PACKAGES
53 List packages that have declared conflicts with at least one of the
54 given list. This includes conflicts defined from the packages in
55 the list, from the other package, or by a common conflict-class:
56 field.
57
58 --depends-on=PACKAGES
59 List only packages that depend on one of (comma-separated)
60 PACKAGES.
61
62 --depopts
63 Include optional dependencies in dependency requests.
64
65 --dev
66 Include development packages in dependencies.
67
68 --field-match=FIELD:PATTERN
69 Filter packages with a match for PATTERN on the given FIELD
70
71 --has-flag=FLAG
72 Only include packages which have the given flag set. Package flags
73 are one of: light-uninstall verbose plugin compiler conf
74
75 --has-tag=TAG
76 Only includes packages which have the given tag set
77
78 --installable
79 List only packages that are installable according to the defined
80 environment (this calls the solver and may be more costly; a
81 package depending on an unavailable one may be available, but is
82 never installable)
83
84 --nobuild
85 Exclude build dependencies (they are included by default).
86
87 --or
88 Instead of selecting packages that match all the criteria, select
89 packages that match any of them
90
91 --post
92 Include dependencies tagged as post.
93
94 --recursive
95 With `--depends-on' and `--required-by', display all transitive
96 dependencies rather than just direct dependencies.
97
98 --required-by=PACKAGES
99 List only the dependencies of (comma-separated) PACKAGES.
100
101 --resolve=PACKAGES
102 Restrict to a solution to install (comma-separated) PACKAGES, i.e.
103 a consistent set of packages including those. This is subtly
104 different from `--required-by --recursive`, which is more
105 predictable and can't fail, but lists all dependencies
106 independently without ensuring consistency. Without `--installed`,
107 the answer is self-contained and independent of the current
108 installation. With `--installed', it's computed from the set of
109 currently installed packages. `--no-switch` further makes the
110 solution independent from the currently pinned packages,
111 architecture, and compiler version. The combination with
112 `--depopts' is not supported.
113
114 -t, --with-test, --test
115 Include test-only dependencies.
116
117 --with-doc, --doc
118 Include doc-only dependencies.
119
121 --columns=COLUMNS
122 Select the columns to display among: name, version, package,
123 synopsis, synopsis-or-target, description, <field>:,
124 installed-version, pin, source-hash, opam-file,
125 all-installed-versions, available-versions, all-versions,
126 repository, installed-files, vc-ref, depexts. The default is name
127 when --short is present and name, installed-version,
128 synopsis-or-target otherwise.
129
130 --normalise
131 Print the values of opam fields normalised
132
133 -S, --sort
134 Sort the packages in dependency order (i.e. an order in which they
135 could be individually installed.)
136
137 -s, --short
138 Don't print a header, and sets the default columns to name only. If
139 you need package versions included, use --columns=package instead
140
141 --separator=STRING (absent= )
142 Set the column-separator string
143
144 -V, --all-versions
145 Normally, when multiple versions of a package match, only one is
146 shown in the output (the installed one, the pinned-to one, or,
147 failing that, the highest one available or the highest one). This
148 flag disables this behaviour and shows all matching versions. This
149 also changes the default display format to include package versions
150 instead of just package names (including when --short is set). This
151 is automatically turned on when a single non-pattern package name
152 is provided on the command-line.
153
154 --wrap
155 Wrap long lines, the default being to truncate when displaying on a
156 terminal, or to keep as is otherwise
157
159 These options are common to all commands.
160
161 --best-effort
162 Don't fail if all requested packages can't be installed: try to
163 install as many as possible. Note that not all external solvers may
164 support this option (recent versions of aspcud or mccs should).
165 This is equivalent to setting $OPAMBESTEFFORT environment variable.
166
167 --cli=MAJOR.MINOR (absent=2.1)
168 Use the command-line interface syntax and semantics of MAJOR.MINOR.
169 Intended for any persistent use of opam (scripts, blog posts,
170 etc.), any version of opam in the same MAJOR series will behave as
171 for the specified MINOR release. The flag was not available in opam
172 2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable
173 to 2.0 instead of using this parameter.
174
175 --color=WHEN
176 Colorize the output. WHEN must be one of always, never or auto.
177
178 --confirm-level=LEVEL
179 Confirmation level, LEVEL must be one of ask, no, yes or
180 unsafe-yes. Can be specified more than once. If --yes or --no are
181 also given, the value of the last --confirm-level is taken into
182 account. This is equivalent to setting $OPAMCONFIRMLEVEL`.
183
184 --criteria=CRITERIA
185 Specify user preferences for dependency solving for this run.
186 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
187 on the supported language, and the external solvers available, see
188 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
189 using solver preferences can be found at
190 http://www.dicosmo.org/Articles/usercriteria.pdf.
191
192 --cudf=FILENAME
193 Debug option: Save the CUDF requests sent to the solver to
194 FILENAME-<n>.cudf.
195
196 --debug
197 Print debug message to stderr. This is equivalent to setting
198 $OPAMDEBUG to "true".
199
200 --debug-level=LEVEL
201 Like --debug, but allows specifying the debug level (--debug sets
202 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
203
204 --git-version
205 Print the git version of opam, if set (i.e. you are using a
206 development version), and exit.
207
208 --help[=FMT] (default=auto)
209 Show this help in format FMT. The value FMT must be one of auto,
210 pager, groff or plain. With auto, the format is pager or plain
211 whenever the TERM env var is dumb or undefined.
212
213 --ignore-pin-depends
214 Ignore extra pins required by packages that get pinned, either
215 manually through opam pin or through opam install DIR. This is
216 equivalent to setting IGNOREPINDEPENDS=true.
217
218 --json=FILENAME
219 Save the results of the opam run in a computer-readable file. If
220 the filename contains the character `%', it will be replaced by an
221 index that doesn't overwrite an existing file. Similar to setting
222 the $OPAMJSON variable.
223
224 --no-aspcud
225 Removed in 2.1.
226
227 --no-auto-upgrade
228 When configuring or updating a repository that is written for an
229 earlier opam version (1.2), opam internally converts it to the
230 current format. This disables this behaviour. Note that
231 repositories should define their format version in a 'repo' file at
232 their root, or they will be assumed to be in the older format. It
233 is, in any case, preferable to upgrade the repositories manually
234 using opam admin upgrade [--mirror URL] when possible.
235
236 -q, --quiet
237 Disables --verbose.
238
239 --root=ROOT
240 Use ROOT as the current root path. This is equivalent to setting
241 $OPAMROOT to ROOT.
242
243 --safe, --readonly
244 Make sure nothing will be automatically updated or rewritten.
245 Useful for calling from completion scripts, for example. Will fail
246 whenever such an operation is needed ; also avoids waiting for
247 locks, skips interactive questions and overrides the $OPAMDEBUG
248 variable. This is equivalent to set environment variable $OPAMSAFE.
249
250 --solver=CMD
251 Specify the CUDF solver to use for resolving package installation
252 problems. This is either a predefined solver (this version of opam
253 supports builtin-mccs+lp(), builtin-mccs+glpk,
254 builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
255 mccs, aspcud-old, packup), or a custom command that should contain
256 the variables %{input}%, %{output}%, %{criteria}%, and optionally
257 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
258
259 --strict
260 Fail whenever an error is found in a package definition or a
261 configuration file. The default is to continue silently if
262 possible.
263
264 --switch=SWITCH
265 Use SWITCH as the current compiler switch. This is equivalent to
266 setting $OPAMSWITCH to SWITCH.
267
268 --use-internal-solver
269 Disable any external solver, and use the built-in one (this
270 requires that opam has been compiled with a built-in solver). This
271 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
272
273 -v, --verbose
274 Be more verbose. One -v shows all package commands, repeat to also
275 display commands called internally (e.g. tar, curl, patch etc.)
276 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
277
278 --version
279 Show version information.
280
281 -w, --working-dir
282 Whenever updating packages that are bound to a local,
283 version-controlled directory, update to the current working state
284 of their source instead of the last committed state, or the ref
285 they are pointing to. As source directory is copied as it is, if it
286 isn't clean it may result on a opam build failure.This only affects
287 packages explicitly listed on the command-line.It can also be set
288 with $OPAMWORKINGDIR.
289
291 Opam makes use of the environment variables listed here. Boolean
292 variables should be set to "0", "no", "false" or the empty string to
293 disable, "1", "yes" or "true" to enable.
294
295 OPAMALLPARENS surround all filters with parenthesis.
296
297 OPAMASSUMEDEPEXTS see option `--assume-depexts'.
298
299 OPAMAUTOREMOVE see remove option `--auto-remove'.
300
301 OPAMBESTEFFORT see option `--best-effort'.
302
303 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
304 the criteria when the `--best-effort' option is set, and is expected to
305 maximise the `opam-query' property in the solution.
306
307 OPAMBUILDDOC Removed in 2.1.
308
309 OPAMBUILDTEST Removed in 2.1.
310
311 OPAMCLI see option `--cli'.
312
313 OPAMCOLOR when set to always or never, sets a default value for the
314 `--color' option.
315
316 OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
317 priority over OPAMYES and OPAMNO.
318
319 OPAMCRITERIA specifies user preferences for dependency solving. The
320 default value depends on the solver version, use `config report' to
321 know the current setting. See also option --criteria.
322
323 OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
324
325 OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
326 preprocessing.
327
328 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
329 for more options.
330
331 OPAMDEBUG see options `--debug' and `--debug-level'.
332
333 OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
334 list of sections. Sections can optionally have a specific debug level
335 (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
336 `--debug-level'.
337
338 OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
339 CUDF preprocessing is.
340
341 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
342
343 OPAMDROPWORKINGDIR overrides packages previously updated with
344 --working-dir on update. Without this variable set, opam would keep
345 them unchanged unless explicitly named on the command-line.
346
347 OPAMDRYRUN see option `--dry-run'.
348
349 OPAMEDITOR sets the editor to use for opam file editing, overrides
350 $EDITOR and $VISUAL.
351
352 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
353 fails. 0 to print all.
354
355 OPAMEXTERNALSOLVER see option `--solver'.
356
357 OPAMFAKE see option `--fake'.
358
359 OPAMFETCH specifies how to download files: either `wget', `curl' or a
360 custom command where variables %{url}%, %{out}%, %{retry}%,
361 %{compress}% and %{checksum}% will be replaced. Overrides the
362 'download-command' value from the main config file.
363
364 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
365
366 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
367
368 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
369
370 OPAMINPLACEBUILD see option `--inplace-build'.
371
372 OPAMJOBS sets the maximum number of parallel workers to run.
373
374 OPAMJSON log json output to the given file (use character `%' to index
375 the files).
376
377 OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
378
379 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
380 some backups. This skips some finalisers and may also help to get more
381 reliable backtraces.
382
383 OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
384
385 OPAMLOGS logdir sets log directory, default is a temporary directory in
386 /tmp
387
388 OPAMMAKECMD set the system make command to use.
389
390 OPAMMERGEOUT merge process outputs, stderr on stdout.
391
392 OPAMNO answer no to any question asked, see options `--no` and
393 `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
394 OPAMYES is set.
395
396 OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
397
398 OPAMNOASPCUD Deprecated.
399
400 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
401 in an earlier format to the current one, on 'update' or 'init'.
402
403 OPAMNOCHECKSUMS enables option --no-checksums when available.
404
405 OPAMNODEPEXTS disables system dependencies handling, see option
406 `--no-depexts'.
407
408 OPAMNOENVNOTICE Internal.
409
410 OPAMNOSELFUPGRADE see option `--no-self-upgrade'
411
412 OPAMPINKINDAUTO sets whether version control systems should be detected
413 when pinning to a local path. Enabled by default since 1.3.0.
414
415 OPAMPRECISETRACKING fine grain tracking of directories.
416
417 OPAMPREPRO set this to false to disable CUDF preprocessing. Less
418 efficient, but might help debugging solver issue.
419
420 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
421 available (e.g. for `opam install').
422
423 OPAMRETRIES sets the number of tries before failing downloads.
424
425 OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
426
427 OPAMROOT see option `--root'. This is automatically set by `opam env
428 --root=DIR --set-root'.
429
430 OPAMROOTISOK don't complain when running as root.
431
432 OPAMSAFE see option `--safe'.
433
434 OPAMSHOW see option `--show'.
435
436 OPAMSKIPUPDATE see option `--skip-updates'.
437
438 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
439 compatibility testing only.
440
441 OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
442 return a solution when they reach timeout; while the solution remains
443 assured to be consistent, there is no guarantee in this case that it
444 fits the expected optimisation criteria. If `true', opam willcontinue
445 with a warning, if `false' a timeout is an error. Currently only the
446 builtin-z3 backend handles this degraded case.
447
448 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
449 60.0, set to 0 for unlimited. Note that all solvers may not support
450 this option.
451
452 OPAMSTATS display stats at the end of command.
453
454 OPAMSTATUSLINE display a dynamic status line showing what's currently
455 going on on the terminal. (one of one of always, never or auto)
456
457 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
458
459 OPAMSWITCH see option `--switch'. Automatically set by `opam env
460 --switch=SWITCH --set-switch'.
461
462 OPAMUNLOCKBASE see install option `--unlock-base'.
463
464 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
465 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
466 are set. See also option --criteria.
467
468 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
469
470 OPAMUSEOPENSSL force openssl use for hash computing.
471
472 OPAMUTF8 use UTF8 characters in output (one of one of always, never or
473 auto). By default `auto', which is determined from the locale).
474
475 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
476 Implies OPAMUTF8. This is set by default on OSX only.
477
478 OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
479 opam repository update.
480
481 OPAMVERBOSE see option `--verbose'.
482
483 OPAMVERSIONLAGPOWER do not use.
484
485 OPAMWITHDOC see install option `--with-doc'.
486
487 OPAMWITHTEST see install option `--with-test.
488
489 OPAMWORKINGDIR see option `--working-dir'.
490
491 OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
492 priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
493
494 OPAMVAR_var overrides the contents of the variable var when
495 substituting `%{var}%` strings in `opam` files.
496
497 OPAMVAR_package_var overrides the contents of the variable package:var
498 when substituting `%{package:var}%` strings in `opam` files.
499
501 All scripts and programmatic invocations of opam should use `--cli' in
502 order to ensure that they work seamlessly with future versions of the
503 opam client. Additionally, blog posts or other documentation can
504 benefit, as it prevents information from becoming stale.
505
506 Although opam only supports roots (~/.opam/) for the current version,
507 it does provide backwards compatibility for its command-line interface.
508
509 Since CLI version support was only added in opam 2.1, use OPAMCLI to
510 select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
511 for 2.1 (or later) versions, since an environment variable controlling
512 the parsing of syntax is brittle. To this end, opam displays a warning
513 if OPAMCLI specifies a valid version other than 2.0, and also if
514 `--cli=2.0' is specified.
515
516 The command-line version is selected by using the `--cli' option or the
517 OPAMCLI environment variable. `--cli' may be specified morethan once,
518 where the last instance takes precedence. OPAMCLI is only inspected if
519 `--cli' is not given.
520
522 As an exception to the following, the `exec' command returns 127 if the
523 command was not found or couldn't be executed, and the command's exit
524 value otherwise.
525
526 0 Success, or true for boolean queries.
527
528 1 False. Returned when a boolean return value is expected, e.g. when
529 running with --check, or for queries like opam lint.
530
531 2 Bad command-line arguments, or command-line arguments pointing to
532 an invalid context (e.g. file not following the expected format).
533
534 5 Not found. You requested something (package, version, repository,
535 etc.) that couldn't be found.
536
537 10 Aborted. The operation required confirmation, which wasn't given.
538
539 15 Could not acquire the locks required for the operation.
540
541 20 There is no solution to the user request. This can be caused by
542 asking to install two incompatible packages, for example.
543
544 30 Error in package definition, or other metadata files. Using
545 --strict raises this error more often.
546
547 31 Package script error. Some package operations were unsuccessful.
548 This may be an error in the packages or an incompatibility with
549 your system. This can be a partial error.
550
551 40 Sync error. Could not fetch some remotes from the network. This can
552 be a partial error.
553
554 50 Configuration error. Opam or system configuration doesn't allow
555 operation, and needs fixing.
556
557 60 Solver failure. The solver failed to return a sound answer. It can
558 be due to a broken external solver, or an error in solver
559 configuration.
560
561 99 Internal error. Something went wrong, likely due to a bug in opam
562 itself.
563
564 130 User interrupt. SIGINT was received, generally due to the user
565 pressing Ctrl-C.
566
568 See https://opam.ocaml.org/doc.
569
571 Vincent Bernardoff <vb@luminar.eu.org>
572 Raja Boujbel <raja.boujbel@ocamlpro.com>
573 Roberto Di Cosmo <roberto@dicosmo.org>
574 Thomas Gazagnaire <thomas@gazagnaire.org>
575 Louis Gesbert <louis.gesbert@ocamlpro.com>
576 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
577 Anil Madhavapeddy <anil@recoil.org>
578 Guillem Rieu <guillem.rieu@ocamlpro.com>
579 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
580 Frederic Tuong <tuong@users.gforge.inria.fr>
581
583 Check bug reports at https://github.com/ocaml/opam/issues.
584
585
586
587Opam admin 2.1.5 OPAM ADMIN-LIST(1)