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

ENVIRONMENT VARIABLES

237       Opam makes use of the environment variables listed here. Boolean
238       variables should be set to "0", "no", "false" or the empty string to
239       disable, "1", "yes" or "true" to enable.
240
241       OPAMALLPARENS surround all filters with parenthesis
242
243       OPAMAUTOREMOVE see remove option `--auto-remove`
244
245       OPAMBESTEFFORT see option `--best-effort`
246
247       OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
248       the criteria when the `--best-effort` option is set, and is expected to
249       maximise the `opam-query` property in the solution
250
251       OPAMCOLOR, when set to always or never, sets a default value for the
252       --color option.
253
254       OPAMCRITERIA specifies user preferences for dependency solving. The
255       default value depends on the solver version, use `config report` to
256       know the current setting. See also option --criteria
257
258       OPAMCUDFFILE file save the cudf graph to file-actions-explicit.dot
259
260       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
261       for more options.
262
263       OPAMDEBUG see options `--debug' and `--debug-level'.
264
265       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
266
267       OPAMDRYRUN see option `--dry-run`
268
269       OPAMEDITOR sets the editor to use for opam file editing, overrides
270       $EDITOR and $VISUAL
271
272       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
273       fails. 0 to print all.
274
275       OPAMEXTERNALSOLVER see option `--solver'.
276
277       OPAMFAKE see option `--fake`
278
279       OPAMFETCH specifies how to download files: either `wget', `curl' or a
280       custom command where variables %{url}%, %{out}%, %{retry}%,
281       %{compress}% and %{checksum}% will be replaced. Overrides the
282       'download-command' value from the main config file.
283
284       OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup
285
286       OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on`
287
288       OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends`
289
290       OPAMJOBS sets the maximum number of parallel workers to run.
291
292       OPAMJSON log json output to the given file (use character `%' to index
293       the files)
294
295       OPAMLOCKED see install option `--locked`
296
297       OPAMLOGS logdir sets log directory, default is a temporary directory in
298       /tmp
299
300       OPAMMAKECMD set the system make command to use
301
302       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
303       in an earlier format to the current one, on 'update' or 'init'.
304
305       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
306       some backups. This skips some finalisers and may also help to get more
307       reliable backtraces
308
309       OPAMLOCKRETRIES sets the number of tries after which opam gives up
310       acquiring its lock and fails. <= 0 means infinite wait.
311
312       OPAMMERGEOUT merge process outputs, stderr on stdout
313
314       OPAMNO answer no to any question asked.
315
316       OPAMNOASPCUD Deprecated.
317
318       OPAMNOCHECKSUMS enables option --no-checksums when available.
319
320       OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
321
322       OPAMPINKINDAUTO sets whether version control systems should be detected
323       when pinning to a local path. Enabled by default since 1.3.0.
324
325       OPAMPRECISETRACKING fine grain tracking of directories
326
327       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
328       available (e.g. for `opam install`).
329
330       OPAMRETRES sets the number of tries before failing downloads.
331
332       OPAMROOT see option `--root'. This is automatically set by `opam env
333       --root=DIR --set-root'.
334
335       OPAMROOTISOK don't complain when running as root.
336
337       OPAMSAFE see option `--safe'
338
339       OPAMSHOW see option `--show`
340
341       OPAMSKIPUPDATE see option `--skip-updates`
342
343       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
344       compatibility testing only.
345
346       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
347       60.0, set to 0 for unlimited. Note that all solvers may not support
348       this option.
349
350       OPAMSTATUSLINE display a dynamic status line showing what's currently
351       going on on the terminal. (one of one of `always', `never' or `auto')
352
353       OPAMSTATS display stats at the end of command
354
355       OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.)
356
357       OPAMSWITCH see option `--switch'. Automatically set by `opam env
358       --switch=SWITCH --set-switch'.
359
360       OPAMUNLOCKBASE see install option `--unlock-base`
361
362       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
363       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
364       are set. See also option --criteria
365
366       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
367
368       OPAMUSEOPENSSL force openssl use for hash computing
369
370       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
371       or `auto'). By default `auto', which is determined from the locale).
372
373       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
374       Implies OPAMUTF8. This is set by default on OSX only.
375
376       OPAMVALIDATIONHOOK hook if set, uses the `%{hook%}` command to validate
377       an opam repository update
378
379       OPAMVAR_var overrides the contents of the variable var when
380       substituting `%{var}%` strings in `opam` files.
381
382       OPAMVAR_package_var overrides the contents of the variable package:var
383       when substituting `%{package:var}%` strings in `opam` files.
384
385       OPAMVERBOSE see option `--verbose'.
386
387       OPAMWORKINGDIR see option `--working-dir`
388
389       OPAMYES see option `--yes'.
390

EXIT STATUS

392       As an exception to the following, the `exec' command returns 127 if the
393       command was not found or couldn't be executed, and the command's exit
394       value otherwise.
395
396       0   Success, or true for boolean queries.
397
398       1   False. Returned when a boolean return value is expected, e.g. when
399           running with --check, or for queries like opam lint.
400
401       2   Bad command-line arguments, or command-line arguments pointing to
402           an invalid context (e.g. file not following the expected format).
403
404       5   Not found. You requested something (package, version, repository,
405           etc.) that couldn't be found.
406
407       10  Aborted. The operation required confirmation, which wasn't given.
408
409       15  Could not acquire the locks required for the operation.
410
411       20  There is no solution to the user request. This can be caused by
412           asking to install two incompatible packages, for example.
413
414       30  Error in package definition, or other metadata files. Using
415           --strict raises this error more often.
416
417       31  Package script error. Some package operations were unsuccessful.
418           This may be an error in the packages or an incompatibility with
419           your system. This can be a partial error.
420
421       40  Sync error. Could not fetch some remotes from the network. This can
422           be a partial error.
423
424       50  Configuration error. Opam or system configuration doesn't allow
425           operation, and needs fixing.
426
427       60  Solver failure. The solver failed to return a sound answer. It can
428           be due to a broken external solver, or an error in solver
429           configuration.
430
431       99  Internal error. Something went wrong, likely due to a bug in opam
432           itself.
433
434       130 User interrupt. SIGINT was received, generally due to the user
435           pressing Ctrl-C.
436

FURTHER DOCUMENTATION

438       See https://opam.ocaml.org/doc.
439

AUTHORS

441       Vincent Bernardoff <vb@luminar.eu.org>
442       Raja Boujbel <raja.boujbel@ocamlpro.com>
443       Roberto Di Cosmo <roberto@dicosmo.org>
444       Thomas Gazagnaire <thomas@gazagnaire.org>
445       Louis Gesbert <louis.gesbert@ocamlpro.com>
446       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
447       Anil Madhavapeddy <anil@recoil.org>
448       Guillem Rieu <guillem.rieu@ocamlpro.com>
449       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
450       Frederic Tuong <tuong@users.gforge.inria.fr>
451

BUGS

453       Check bug reports at https://github.com/ocaml/opam/issues.
454
455
456
457Opam admin 2.0.6                                          OPAM ADMIN-FILTER(1)
Impressum