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

COMMON OPTIONS

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

ENVIRONMENT VARIABLES

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

EXIT STATUS

360       As an exception to the following, the `exec' command returns 127 if the
361       command was not found or couldn't be executed, and the command's exit
362       value otherwise.
363
364       0   Success, or true for boolean queries.
365
366       1   False. Returned when a boolean return value is expected, e.g. when
367           running with --check, or for queries like opam lint.
368
369       2   Bad command-line arguments, or command-line arguments pointing to
370           an invalid context (e.g. file not following the expected format).
371
372       5   Not found. You requested something (package, version, repository,
373           etc.) that couldn't be found.
374
375       10  Aborted. The operation required confirmation, which wasn't given.
376
377       15  Could not acquire the locks required for the operation.
378
379       20  There is no solution to the user request. This can be caused by
380           asking to install two incompatible packages, for example.
381
382       30  Error in package definition, or other metadata files. Using
383           --strict raises this error more often.
384
385       31  Package script error. Some package operations were unsuccessful.
386           This may be an error in the packages or an incompatibility with
387           your system. This can be a partial error.
388
389       40  Sync error. Could not fetch some remotes from the network. This can
390           be a partial error.
391
392       50  Configuration error. Opam or system configuration doesn't allow
393           operation, and needs fixing.
394
395       60  Solver failure. The solver failed to return a sound answer. It can
396           be due to a broken external solver, or an error in solver
397           configuration.
398
399       99  Internal error. Something went wrong, likely due to a bug in opam
400           itself.
401
402       130 User interrupt. SIGINT was received, generally due to the user
403           pressing Ctrl-C.
404

FURTHER DOCUMENTATION

406       See https://opam.ocaml.org/doc.
407

AUTHORS

409       Vincent Bernardoff <vb@luminar.eu.org>
410       Raja Boujbel <raja.boujbel@ocamlpro.com>
411       Roberto Di Cosmo <roberto@dicosmo.org>
412       Thomas Gazagnaire <thomas@gazagnaire.org>
413
414       Louis Gesbert <louis.gesbert@ocamlpro.com>
415       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
416       Anil Madhavapeddy <anil@recoil.org>
417       Guillem Rieu <guillem.rieu@ocamlpro.com>
418       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
419       Frederic Tuong <tuong@users.gforge.inria.fr>
420

BUGS

422       Check bug reports at https://github.com/ocaml/opam/issues.
423
424
425
426Opam 2.0.1                                                   opam-reinstall(1)
Impressum