1OPAM-REINSTALL(1)                 Opam Manual                OPAM-REINSTALL(1)
2
3
4

NAME

6       opam-reinstall - Reinstall a list of packages.
7

SYNOPSIS

9       opam reinstall [OPTION]... [PACKAGES]...
10

DESCRIPTION

12       This command removes the given packages and the ones that depend on
13       them, and reinstalls the same versions. Without arguments, assume
14       --pending and reinstall any package with upstream changes.
15
16       If a directory is specified as argument, anything that is pinned to
17       that directory is selected for reinstall.
18

ARGUMENTS

20       PACKAGES
21           List of package names, with an optional version or constraint, e.g
22           `pkg', `pkg.1.0' or `pkg>=0.5' ; or directory names containing
23           package description, with explicit directory (e.g. `./srcdir' or
24           `.')
25

OPTIONS

27       --assume-built
28           For use on locally-pinned packages: assume they have already been
29           correctly built, and only run their installation instructions,
30           directly from their source directory. This skips the build
31           instructions and can be useful to install packages that are being
32           worked on. Implies --inplace-build. No locally-pinned packages will
33           be skipped.
34
35       --forget-pending
36           Forget about pending reinstallations of listed packages. This
37           implies making opam assume that your packages were installed with a
38           newer version of their metadata, so only use this if you know what
39           you are doing, and the actual changes you are overriding.
40
41       -j JOBS, --jobs=JOBS
42           Set the maximal number of concurrent jobs to use. The default value
43           is calculated from the number of cores. You can also set it using
44           the $OPAMJOBS environment variable.
45
46       --list-pending
47           List packages that have been changed since installed and are marked
48           for reinstallation
49
50       --pending
51           Perform pending reinstallations, i.e. reinstallations of packages
52           that have changed since installed
53

PACKAGE BUILD OPTIONS

55       -b, --keep-build-dir
56           Keep the build directories after compiling packages. This is
57           equivalent to setting $OPAMKEEPBUILDDIR to "true".
58
59       -d, --with-doc, --build-doc
60           Build the package documentation. This only affects packages listed
61           on the command-line. The --build-doc form is deprecated as this
62           does also installation. This is equivalent to setting $OPAMWITHDOC
63           (or the deprecated $OPAMBUILDDOC) to "true".
64
65       --dry-run
66           Simulate the command, but don't actually perform any changes. This
67           also can be set with environment variable $OPAMDEBUG.
68
69       --fake
70           This option registers the actions into the opam database, without
71           actually performing them. WARNING: This option is dangerous and
72           likely to break your opam environment. You probably want
73           `--dry-run'. You've been warned.
74
75       --ignore-constraints-on[=PACKAGES] (default=)
76           Forces opam to ignore version constraints on all dependencies to
77           the listed packages. This can be used to test compatibility, but
78           expect builds to break when using this. Note that version
79           constraints on optional dependencies and conflicts are unaffected.
80           This is equivalent to setting $OPAMIGNORECONSTRAINTS.
81
82       --inplace-build
83           When compiling a package which has its source bound to a local
84           directory, process the build and install actions directly in that
85           directory, rather than in a clean copy handled by opam. This only
86           affects packages that are explicitly listed on the command-line.
87           This is equivalent to setting $OPAMINPLACEBUILD to "true".
88
89       --locked[=SUFFIX] (default=locked)
90           In commands that use opam files found from pinned sources, if a
91           variant of the file with an added .SUFFIX extension is found (e.g.
92           foo.opam.locked besides foo.opam), that will be used instead. This
93           is typically useful to offer a more specific set of dependencies
94           and reproduce similar build contexts, hence the name. The opam lock
95           plugin can be used to generate such files, based on the versions of
96           the dependencies currently installed on the host. This is
97           equivalent to setting the $OPAMLOCKED environment variable. Note
98           that this option doesn't generally affect already pinned packages.
99
100       -m MAKE, --make=MAKE
101           Use MAKE as the default 'make' command. Deprecated: use opam config
102           set[-global] make MAKE instead. Has no effect if the make variable
103           is defined.
104
105       --no-checksums
106           Do not verify the checksum of downloaded archives.This is
107           equivalent to setting $OPAMNOCHECKSUMS to "true".
108
109       --require-checksums
110           Reject the installation of packages that don't provide a checksum
111           for the upstream archives. This is equivalent to setting
112           $OPAMREQUIRECHECKSUMS to "true".
113
114       --reuse-build-dir
115           Reuse existing build directories (kept by using --keep-build-dir),
116           instead of compiling from a fresh clone of the source. This can be
117           faster, but also lead to failures if the build systems of the
118           packages don't handle upgrades of dependencies well. This is
119           equivalent to setting $OPAMREUSEBUILDDIR to "true".
120
121       --show-actions
122           Call the solver and display the actions. Don't perform any changes.
123           This is equivalent to setting $OPAMSHOW.
124
125       --skip-updates
126           When running an install, upgrade or reinstall on source-pinned
127           packages, they are normally updated from their origin first. This
128           flag disables that behaviour and will keep them to their version in
129           cache. This is equivalent to setting $OPAMSKIPUPDATE.
130
131       -t, --with-test, --build-test
132           Build and run the package unit-tests. This only affects packages
133           listed on the command-line. The --build-test form is deprecated as
134           this also affects installation. This is equivalent to setting
135           $OPAMWITHTEST (or the deprecated $OPAMBUILDTEST) to "true".
136
137       --unlock-base
138           Allow changes to the packages set as switch base (typically, the
139           main compiler). Use with caution. This is equivalent to setting the
140           $OPAMUNLOCKBASE environment variable
141

COMMON OPTIONS

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

ENVIRONMENT VARIABLES

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

EXIT STATUS

422       As an exception to the following, the `exec' command returns 127 if the
423       command was not found or couldn't be executed, and the command's exit
424       value otherwise.
425
426       0   Success, or true for boolean queries.
427
428       1   False. Returned when a boolean return value is expected, e.g. when
429           running with --check, or for queries like opam lint.
430
431       2   Bad command-line arguments, or command-line arguments pointing to
432           an invalid context (e.g. file not following the expected format).
433
434       5   Not found. You requested something (package, version, repository,
435           etc.) that couldn't be found.
436
437       10  Aborted. The operation required confirmation, which wasn't given.
438
439       15  Could not acquire the locks required for the operation.
440
441       20  There is no solution to the user request. This can be caused by
442           asking to install two incompatible packages, for example.
443
444       30  Error in package definition, or other metadata files. Using
445           --strict raises this error more often.
446
447       31  Package script error. Some package operations were unsuccessful.
448           This may be an error in the packages or an incompatibility with
449           your system. This can be a partial error.
450
451       40  Sync error. Could not fetch some remotes from the network. This can
452           be a partial error.
453
454       50  Configuration error. Opam or system configuration doesn't allow
455           operation, and needs fixing.
456
457       60  Solver failure. The solver failed to return a sound answer. It can
458           be due to a broken external solver, or an error in solver
459           configuration.
460
461       99  Internal error. Something went wrong, likely due to a bug in opam
462           itself.
463
464       130 User interrupt. SIGINT was received, generally due to the user
465           pressing Ctrl-C.
466

FURTHER DOCUMENTATION

468       See https://opam.ocaml.org/doc.
469

AUTHORS

471       Vincent Bernardoff <vb@luminar.eu.org>
472       Raja Boujbel <raja.boujbel@ocamlpro.com>
473       Roberto Di Cosmo <roberto@dicosmo.org>
474       Thomas Gazagnaire <thomas@gazagnaire.org>
475       Louis Gesbert <louis.gesbert@ocamlpro.com>
476       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
477       Anil Madhavapeddy <anil@recoil.org>
478       Guillem Rieu <guillem.rieu@ocamlpro.com>
479       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
480       Frederic Tuong <tuong@users.gforge.inria.fr>
481

BUGS

483       Check bug reports at https://github.com/ocaml/opam/issues.
484
485
486
487Opam 2.0.6                                                   OPAM-REINSTALL(1)
Impressum