1opam admin-filter(1)           Opam admin Manual          opam admin-filter(1)
2
3
4

NAME

6       opam admin-filter - Filters a repository to only keep selected packages
7

SYNOPSIS

9       opam admin filter [OPTION]... [PATTERNS]...
10

DESCRIPTION

12       This command removes all package definitions that don't match the
13       search criteria (specified similarly to 'opam admin list') from a
14       repository.
15

ARGUMENTS

17       PATTERNS
18           Package patterns with globs. matching against NAME or NAME.VERSION
19

OPTIONS

21       --dry-run
22           List the removal commands, without actually performing them
23
24       --environment=VAL
25           Use the given opam environment, in the form of a list
26           comma-separated 'var=value' bindings, when resolving variables.
27           This is used e.g. when computing available packages: if undefined,
28           availability of packages is not taken into account. Note that,
29           unless overriden, variables like 'root' or 'opam-version' may be
30           taken from the current opam installation. What is defined in
31           ~/.opam/config is always ignored.
32
33       --remove
34           Invert the behaviour and remove the matching packages, keeping the
35           ones that don't match.
36

PACKAGE SELECTION OPTIONS

38       -A, --all
39           Include all, even uninstalled or unavailable packages
40
41       -a, --available
42           List only packages that are available according to the defined
43           environment. Without --environment, equivalent to --all.
44
45       --coinstallable-with=PACKAGES
46           Only list packages that are compatible with all of PACKAGES.
47
48       --conflicts-with=PACKAGES
49           List packages that have declared conflicts with at least one of the
50           given list. This includes conflicts defined from the packages in
51           the list, from the other package, or by a common conflict-class:
52           field.
53
54       --depends-on=PACKAGES
55           List only packages that depend on one of (comma-separated)
56           PACKAGES.
57
58       --depopts
59           Include optional dependencies in dependency requests.
60
61       --dev
62           Include development packages in dependencies.
63
64       --field-match=FIELD:PATTERN
65           Filter packages with a match for PATTERN on the given FIELD
66
67       --has-flag=FLAG
68           Only include packages which have the given flag set. Package flags
69           are one of: light-uninstall verbose plugin compiler conf
70
71       --has-tag=TAG
72           Only includes packages which have the given tag set
73
74       --installable
75           List only packages that are installable according to the defined
76           environment (this calls the solver and may be more costly; a
77           package depending on an unavailable may be available, but is never
78           installable)
79
80       --nobuild
81           Exclude build dependencies (they are included by default).
82
83       --or
84           Instead of selecting packages that match all the criteria, select
85           packages that match any of them
86
87       --post
88           Include dependencies tagged as post.
89
90       --recursive
91           With `--depends-on' and `--required-by', display all transitive
92           dependencies rather than just direct dependencies.
93
94       --required-by=PACKAGES
95           List only the dependencies of (comma-separated) PACKAGES.
96
97       --resolve=PACKAGES
98           Restrict to a solution to install (comma-separated) PACKAGES, i.e.
99           a consistent set of packages including those. This is subtly
100           different from `--required-by --recursive`, which is more
101           predictable and can't fail, but lists all dependencies
102           independently without ensuring consistency. Without `--installed`,
103           the answer is self-contained and independent of the current
104           installation. With `--installed', it's computed from the set of
105           currently installed packages. `--no-switch` further makes the
106           solution independent from the currently pinned packages,
107           architecture, and compiler version. The combination with
108           `--depopts' is not supported.
109
110       -t, --with-test, --test
111           Include test-only dependencies.
112
113       --with-doc, --doc
114           Include doc-only dependencies.
115

COMMON OPTIONS

117       These options are common to all commands.
118
119       --best-effort
120           Don't fail if all requested packages can't be installed: try to
121           install as many as possible. Note that not all external solvers may
122           support this option (recent versions of aspcud or mccs should).
123
124       --color=WHEN
125           Colorize the output. WHEN must be one of `always', `never' or
126           `auto'.
127
128       --criteria=CRITERIA
129           Specify user preferences for dependency solving for this run.
130           Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
131           on the supported language, and the external solvers available, see
132           http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
133           general guide to using solver preferences can be found at
134           http://www.dicosmo.org/Articles/usercriteria.pdf.
135
136       --cudf=FILENAME
137           Debug option: Save the CUDF requests sent to the solver to
138           FILENAME-<n>.cudf.
139
140       --debug
141           Print debug message to stderr. This is equivalent to setting
142           $OPAMDEBUG to "true".
143
144       --debug-level=LEVEL
145           Like --debug, but allows specifying the debug level (--debug sets
146           it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
147
148       --git-version
149           Print the git version of opam, if set (i.e. you are using a
150           development version), and exit.
151
152       --help[=FMT] (default=auto)
153           Show this help in format FMT. The value FMT must be one of `auto',
154           `pager', `groff' or `plain'. With `auto', the format is `pager` or
155           `plain' whenever the TERM env var is `dumb' or undefined.
156
157       --ignore-pin-depends
158           Ignore extra pins required by packages that get pinned, either
159           manually through opam pin or through opam install DIR. This is
160           equivalent to setting IGNOREPINDEPENDS=true.
161
162       --json=FILENAME
163           Save the results of the opam run in a computer-readable file. If
164           the filename contains the character `%', it will be replaced by an
165           index that doesn't overwrite an existing file. Similar to setting
166           the $OPAMJSON variable.
167
168       --no-auto-upgrade
169           When configuring or updating a repository that is written for an
170           earlier opam version (1.2), opam internally converts it to the
171           current format. This disables this behaviour. Note that
172           repositories should define their format version in a 'repo' file at
173           their root, or they will be assumed to be in the older format. It
174           is, in any case, preferable to upgrade the repositories manually
175           using opam admin upgrade [--mirror URL] when possible.
176
177       -q, --quiet
178           Disables --verbose.
179
180       --root=ROOT
181           Use ROOT as the current root path. This is equivalent to setting
182           $OPAMROOT to ROOT.
183
184       --safe, --readonly
185           Make sure nothing will be automatically updated or rewritten.
186           Useful for calling from completion scripts, for example. Will fail
187           whenever such an operation is needed ; also avoids waiting for
188           locks, skips interactive questions and overrides the $OPAMDEBUG
189           variable.
190
191       --solver=CMD
192           Specify the CUDF solver to use for resolving package installation
193           problems. This is either a predefined solver (this version of opam
194           supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
195           aspcud-old, packup), or a custom command that should contain the
196           variables %{input}%, %{output}%, %{criteria}%, and optionally
197           %{timeout}%.
198
199       --strict
200           Fail whenever an error is found in a package definition or a
201           configuration file. The default is to continue silently if
202           possible.
203
204       --switch=SWITCH
205           Use SWITCH as the current compiler switch. This is equivalent to
206           setting $OPAMSWITCH to SWITCH.
207
208       --use-internal-solver, --no-aspcud
209           Disable any external solver, and use the built-in one (this
210           requires that opam has been compiled with a built-in solver).
211
212       -v, --verbose
213           Be more verbose. One -v shows all package commands, repeat to also
214           display commands called internally (e.g. tar, curl, patch etc.)
215           Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
216
217       --version
218           Show version information.
219
220       -w, --working-dir
221           Whenever updating packages that are bound to a local,
222           version-controlled directory, update to the current working state
223           of their source instead of the last committed state, or the ref
224           they are pointing to. This only affects packages explicitly listed
225           on the command-line.
226
227       -y, --yes
228           Answer yes to all yes/no questions without prompting. This is
229           equivalent to setting $OPAMYES to "true".
230

ENVIRONMENT VARIABLES

232       Opam makes use of the environment variables listed here. Boolean
233       variables should be set to "0", "no", "false" or the empty string to
234       disable, "1", "yes" or "true" to enable.
235
236       OPAMCOLOR, when set to always or never, sets a default value for the
237       --color option.
238
239       OPAMCRITERIA specifies user preferences for dependency solving. The
240       default value depends on the solver version, use `config report` to
241       know the current setting. See also option --criteria
242
243       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
244       for more options.
245
246       OPAMDEBUG see options `--debug' and `--debug-level'.
247
248       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
249
250       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
251       fails. 0 to print all.
252
253       OPAMEXTERNALSOLVER see option `--solver'.
254
255       OPAMFETCH specifies how to download files: either `wget', `curl' or a
256       custom command where variables %{url}%, %{out}%, %{retry}%,
257       %{compress}% and %{checksum}% will be replaced. Overrides the
258       'download-command' value from the main config file.
259
260       OPAMJOBS sets the maximum number of parallel workers to run.
261
262       OPAMJSON log json output to the given file (use character `%' to index
263       the files)
264
265       OPAMLOCK see option `--lock'.
266
267       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
268       in an earlier format to the current one, on 'update' or 'init'.
269
270       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
271       some backups. This skips some finalisers and may also help to get more
272       reliable backtraces
273
274       OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
275       acquiring its lock and fails. <= 0 means infinite wait.
276
277       OPAMNO answer no to any question asked.
278
279       OPAMNOASPCUD see option `--no-aspcud'.
280
281       OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
282
283       OPAMPINKINDAUTO sets whether version control systems should be detected
284       when pinning to a local path. Enabled by default since 1.3.0.
285
286       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
287       available (e.g. for `opam install`).
288
289       OPAMRETRY sets the number of tries before failing downloads.
290
291       OPAMROOT see option `--root'. This is automatically set by `opam env
292       --root=DIR --set-root'.
293
294       OPAMROOTISOK don't complain when running as root.
295
296       OPAMSAFE see option `--safe'
297
298       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
299       compatibility testing only.
300
301       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
302       60.0, set to 0 for unlimited. Note that all solvers may not support
303       this option.
304
305       OPAMSTATUSLINE display a dynamic status line showing what's currently
306       going on on the terminal. (one of one of `always', `never' or `auto')
307
308       OPAMSWITCH see option `--switch'. Automatically set by `opam env
309       --switch=SWITCH --set-switch'.
310
311       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
312       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
313       are set. See also option --criteria
314
315       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
316
317       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
318       or `auto'). By default `auto', which is determined from the locale).
319
320       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
321       Implies OPAMUTF8. This is set by default on OSX only.
322
323       OPAMVAR_var overrides the contents of the variable var when
324       substituting `%{var}%` strings in `opam` files.
325
326       OPAMVAR_package_var overrides the contents of the variable package:var
327       when substituting `%{package:var}%` strings in `opam` files.
328
329       OPAMVERBOSE see option `--verbose'.
330
331       OPAMYES see option `--yes'.
332

EXIT STATUS

334       As an exception to the following, the `exec' command returns 127 if the
335       command was not found or couldn't be executed, and the command's exit
336       value otherwise.
337
338       0   Success, or true for boolean queries.
339
340       1   False. Returned when a boolean return value is expected, e.g. when
341           running with --check, or for queries like opam lint.
342
343       2   Bad command-line arguments, or command-line arguments pointing to
344           an invalid context (e.g. file not following the expected format).
345
346       5   Not found. You requested something (package, version, repository,
347           etc.) that couldn't be found.
348
349       10  Aborted. The operation required confirmation, which wasn't given.
350
351       15  Could not acquire the locks required for the operation.
352
353       20  There is no solution to the user request. This can be caused by
354           asking to install two incompatible packages, for example.
355
356       30  Error in package definition, or other metadata files. Using
357           --strict raises this error more often.
358
359       31  Package script error. Some package operations were unsuccessful.
360           This may be an error in the packages or an incompatibility with
361           your system. This can be a partial error.
362
363       40  Sync error. Could not fetch some remotes from the network. This can
364           be a partial error.
365
366       50  Configuration error. Opam or system configuration doesn't allow
367           operation, and needs fixing.
368
369       60  Solver failure. The solver failed to return a sound answer. It can
370           be due to a broken external solver, or an error in solver
371           configuration.
372
373       99  Internal error. Something went wrong, likely due to a bug in opam
374           itself.
375
376       130 User interrupt. SIGINT was received, generally due to the user
377           pressing Ctrl-C.
378

FURTHER DOCUMENTATION

380       See https://opam.ocaml.org/doc.
381

AUTHORS

383       Vincent Bernardoff <vb@luminar.eu.org>
384       Raja Boujbel <raja.boujbel@ocamlpro.com>
385       Roberto Di Cosmo <roberto@dicosmo.org>
386       Thomas Gazagnaire <thomas@gazagnaire.org>
387       Louis Gesbert <louis.gesbert@ocamlpro.com>
388       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
389       Anil Madhavapeddy <anil@recoil.org>
390       Guillem Rieu <guillem.rieu@ocamlpro.com>
391       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
392       Frederic Tuong <tuong@users.gforge.inria.fr>
393

BUGS

395       Check bug reports at https://github.com/ocaml/opam/issues.
396
397
398
399Opam admin 2.0.1                                          opam admin-filter(1)
Impressum