1OPAM-UPDATE(1) Opam Manual OPAM-UPDATE(1)
2
3
4
6 opam-update - Update the list of available packages.
7
9 opam update [OPTION]... [NAMES]...
10
12 Update the package definitions. This fetches the newest version of the
13 repositories configured through opam repository, and the sources of
14 installed development packages and packages pinned in the current
15 switch. To use the updated sources and definitions, use opam upgrade.
16
18 NAMES
19 List of repository or development package names to update.
20
22 -a, --all
23 Update all configured repositories, not only what is set in the
24 current switch
25
26 --check
27 Do the update, then return with code 0 if there were any upstream
28 changes, 1 if there were none. Repositories or development packages
29 that failed to update are considered without changes. With
30 --upgrade, behaves like opam upgrade --check, that is, returns 0
31 only if there are currently availbale updates.
32
33 --development
34 Update development packages (skipping repositories unless
35 --repositories is also specified).
36
37 -j JOBS, --jobs=JOBS
38 Set the maximal number of concurrent jobs to use. The default value
39 is calculated from the number of cores. You can also set it using
40 the $OPAMJOBS environment variable.
41
42 -R, --repositories
43 Update repositories (skipping development packages unless
44 --development is also specified).
45
46 -u, --upgrade
47 Automatically run opam upgrade after the update.
48
50 These options are common to all commands.
51
52 --best-effort
53 Don't fail if all requested packages can't be installed: try to
54 install as many as possible. Note that not all external solvers may
55 support this option (recent versions of aspcud or mccs should).
56 This is equivalent to setting $OPAMBESTEFFORT environment variable.
57
58 --color=WHEN
59 Colorize the output. WHEN must be one of `always', `never' or
60 `auto'.
61
62 --criteria=CRITERIA
63 Specify user preferences for dependency solving for this run.
64 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
65 on the supported language, and the external solvers available, see
66 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
67 using solver preferences can be found at
68 http://www.dicosmo.org/Articles/usercriteria.pdf.
69
70 --cudf=FILENAME
71 Debug option: Save the CUDF requests sent to the solver to
72 FILENAME-<n>.cudf.
73
74 --debug
75 Print debug message to stderr. This is equivalent to setting
76 $OPAMDEBUG to "true".
77
78 --debug-level=LEVEL
79 Like --debug, but allows specifying the debug level (--debug sets
80 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
81
82 --git-version
83 Print the git version of opam, if set (i.e. you are using a
84 development version), and exit.
85
86 --help[=FMT] (default=auto)
87 Show this help in format FMT. The value FMT must be one of `auto',
88 `pager', `groff' or `plain'. With `auto', the format is `pager` or
89 `plain' whenever the TERM env var is `dumb' or undefined.
90
91 --ignore-pin-depends
92 Ignore extra pins required by packages that get pinned, either
93 manually through opam pin or through opam install DIR. This is
94 equivalent to setting IGNOREPINDEPENDS=true.
95
96 --json=FILENAME
97 Save the results of the opam run in a computer-readable file. If
98 the filename contains the character `%', it will be replaced by an
99 index that doesn't overwrite an existing file. Similar to setting
100 the $OPAMJSON variable.
101
102 --no-aspcud
103 Deprecated.
104
105 --no-auto-upgrade
106 When configuring or updating a repository that is written for an
107 earlier opam version (1.2), opam internally converts it to the
108 current format. This disables this behaviour. Note that
109 repositories should define their format version in a 'repo' file at
110 their root, or they will be assumed to be in the older format. It
111 is, in any case, preferable to upgrade the repositories manually
112 using opam admin upgrade [--mirror URL] when possible.
113
114 --no-self-upgrade
115 Opam will replace itself with a newer binary found at OPAMROOT/opam
116 if present. This disables this behaviour.
117
118 -q, --quiet
119 Disables --verbose.
120
121 --root=ROOT
122 Use ROOT as the current root path. This is equivalent to setting
123 $OPAMROOT to ROOT.
124
125 --safe, --readonly
126 Make sure nothing will be automatically updated or rewritten.
127 Useful for calling from completion scripts, for example. Will fail
128 whenever such an operation is needed ; also avoids waiting for
129 locks, skips interactive questions and overrides the $OPAMDEBUG
130 variable. This is equivalent to set environment variable $OPAMSAFE.
131
132 --solver=CMD
133 Specify the CUDF solver to use for resolving package installation
134 problems. This is either a predefined solver (this version of opam
135 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
136 aspcud-old, packup), or a custom command that should contain the
137 variables %{input}%, %{output}%, %{criteria}%, and optionally
138 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
139
140 --strict
141 Fail whenever an error is found in a package definition or a
142 configuration file. The default is to continue silently if
143 possible.
144
145 --switch=SWITCH
146 Use SWITCH as the current compiler switch. This is equivalent to
147 setting $OPAMSWITCH to SWITCH.
148
149 --use-internal-solver
150 Disable any external solver, and use the built-in one (this
151 requires that opam has been compiled with a built-in solver). This
152 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
153
154 -v, --verbose
155 Be more verbose. One -v shows all package commands, repeat to also
156 display commands called internally (e.g. tar, curl, patch etc.)
157 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
158
159 --version
160 Show version information.
161
162 -w, --working-dir
163 Whenever updating packages that are bound to a local,
164 version-controlled directory, update to the current working state
165 of their source instead of the last committed state, or the ref
166 they are pointing to. This only affects packages explicitly listed
167 on the command-line.It can also be set with $OPAMWORKINGDIR.
168
169 -y, --yes
170 Answer yes to all yes/no questions without prompting. This is
171 equivalent to setting $OPAMYES to "true".
172
174 Opam makes use of the environment variables listed here. Boolean
175 variables should be set to "0", "no", "false" or the empty string to
176 disable, "1", "yes" or "true" to enable.
177
178 OPAMALLPARENS surround all filters with parenthesis
179
180 OPAMAUTOREMOVE see remove option `--auto-remove`
181
182 OPAMBESTEFFORT see option `--best-effort`
183
184 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
185 the criteria when the `--best-effort` option is set, and is expected to
186 maximise the `opam-query` property in the solution
187
188 OPAMCOLOR, when set to always or never, sets a default value for the
189 --color option.
190
191 OPAMCRITERIA specifies user preferences for dependency solving. The
192 default value depends on the solver version, use `config report` to
193 know the current setting. See also option --criteria
194
195 OPAMCUDFFILE file save the cudf graph to file-actions-explicit.dot
196
197 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
198 for more options.
199
200 OPAMDEBUG see options `--debug' and `--debug-level'.
201
202 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
203
204 OPAMDRYRUN see option `--dry-run`
205
206 OPAMEDITOR sets the editor to use for opam file editing, overrides
207 $EDITOR and $VISUAL
208
209 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
210 fails. 0 to print all.
211
212 OPAMEXTERNALSOLVER see option `--solver'.
213
214 OPAMFAKE see option `--fake`
215
216 OPAMFETCH specifies how to download files: either `wget', `curl' or a
217 custom command where variables %{url}%, %{out}%, %{retry}%,
218 %{compress}% and %{checksum}% will be replaced. Overrides the
219 'download-command' value from the main config file.
220
221 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup
222
223 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on`
224
225 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends`
226
227 OPAMJOBS sets the maximum number of parallel workers to run.
228
229 OPAMJSON log json output to the given file (use character `%' to index
230 the files)
231
232 OPAMLOCKED see install option `--locked`
233
234 OPAMLOGS logdir sets log directory, default is a temporary directory in
235 /tmp
236
237 OPAMMAKECMD set the system make command to use
238
239 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
240 in an earlier format to the current one, on 'update' or 'init'.
241
242 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
243 some backups. This skips some finalisers and may also help to get more
244 reliable backtraces
245
246 OPAMLOCKRETRIES sets the number of tries after which opam gives up
247 acquiring its lock and fails. <= 0 means infinite wait.
248
249 OPAMMERGEOUT merge process outputs, stderr on stdout
250
251 OPAMNO answer no to any question asked.
252
253 OPAMNOASPCUD Deprecated.
254
255 OPAMNOCHECKSUMS enables option --no-checksums when available.
256
257 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
258
259 OPAMPINKINDAUTO sets whether version control systems should be detected
260 when pinning to a local path. Enabled by default since 1.3.0.
261
262 OPAMPRECISETRACKING fine grain tracking of directories
263
264 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
265 available (e.g. for `opam install`).
266
267 OPAMRETRES sets the number of tries before failing downloads.
268
269 OPAMROOT see option `--root'. This is automatically set by `opam env
270 --root=DIR --set-root'.
271
272 OPAMROOTISOK don't complain when running as root.
273
274 OPAMSAFE see option `--safe'
275
276 OPAMSHOW see option `--show`
277
278 OPAMSKIPUPDATE see option `--skip-updates`
279
280 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
281 compatibility testing only.
282
283 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
284 60.0, set to 0 for unlimited. Note that all solvers may not support
285 this option.
286
287 OPAMSTATUSLINE display a dynamic status line showing what's currently
288 going on on the terminal. (one of one of `always', `never' or `auto')
289
290 OPAMSTATS display stats at the end of command
291
292 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.)
293
294 OPAMSWITCH see option `--switch'. Automatically set by `opam env
295 --switch=SWITCH --set-switch'.
296
297 OPAMUNLOCKBASE see install option `--unlock-base`
298
299 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
300 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
301 are set. See also option --criteria
302
303 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
304
305 OPAMUSEOPENSSL force openssl use for hash computing
306
307 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
308 or `auto'). By default `auto', which is determined from the locale).
309
310 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
311 Implies OPAMUTF8. This is set by default on OSX only.
312
313 OPAMVALIDATIONHOOK hook if set, uses the `%{hook%}` command to validate
314 an opam repository update
315
316 OPAMVAR_var overrides the contents of the variable var when
317 substituting `%{var}%` strings in `opam` files.
318
319 OPAMVAR_package_var overrides the contents of the variable package:var
320 when substituting `%{package:var}%` strings in `opam` files.
321
322 OPAMVERBOSE see option `--verbose'.
323
324 OPAMWORKINGDIR see option `--working-dir`
325
326 OPAMYES see option `--yes'.
327
329 As an exception to the following, the `exec' command returns 127 if the
330 command was not found or couldn't be executed, and the command's exit
331 value otherwise.
332
333 0 Success, or true for boolean queries.
334
335 1 False. Returned when a boolean return value is expected, e.g. when
336 running with --check, or for queries like opam lint.
337
338 2 Bad command-line arguments, or command-line arguments pointing to
339 an invalid context (e.g. file not following the expected format).
340
341 5 Not found. You requested something (package, version, repository,
342 etc.) that couldn't be found.
343
344 10 Aborted. The operation required confirmation, which wasn't given.
345
346 15 Could not acquire the locks required for the operation.
347
348 20 There is no solution to the user request. This can be caused by
349 asking to install two incompatible packages, for example.
350
351 30 Error in package definition, or other metadata files. Using
352 --strict raises this error more often.
353
354 31 Package script error. Some package operations were unsuccessful.
355 This may be an error in the packages or an incompatibility with
356 your system. This can be a partial error.
357
358 40 Sync error. Could not fetch some remotes from the network. This can
359 be a partial error.
360
361 50 Configuration error. Opam or system configuration doesn't allow
362 operation, and needs fixing.
363
364 60 Solver failure. The solver failed to return a sound answer. It can
365 be due to a broken external solver, or an error in solver
366 configuration.
367
368 99 Internal error. Something went wrong, likely due to a bug in opam
369 itself.
370
371 130 User interrupt. SIGINT was received, generally due to the user
372 pressing Ctrl-C.
373
375 See https://opam.ocaml.org/doc.
376
378 Vincent Bernardoff <vb@luminar.eu.org>
379 Raja Boujbel <raja.boujbel@ocamlpro.com>
380 Roberto Di Cosmo <roberto@dicosmo.org>
381 Thomas Gazagnaire <thomas@gazagnaire.org>
382 Louis Gesbert <louis.gesbert@ocamlpro.com>
383 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
384 Anil Madhavapeddy <anil@recoil.org>
385 Guillem Rieu <guillem.rieu@ocamlpro.com>
386 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
387 Frederic Tuong <tuong@users.gforge.inria.fr>
388
390 Check bug reports at https://github.com/ocaml/opam/issues.
391
392
393
394Opam 2.0.4 OPAM-UPDATE(1)