1OPAM-UNINSTALL(1) Opam Manual OPAM-UNINSTALL(1)
2
3
4
6 opam-uninstall - An alias for remove.
7
9 opam uninstall [OPTION]… [PACKAGES]…
10
12 opam uninstall is an alias for opam remove.
13
14 See opam remove --help for details.
15
17 --assume-depexts
18 Skip the installation step for any missing system packages, and
19 attempt to proceed with compilation of the opam packages anyway. If
20 the installation is successful, opam won't prompt again about these
21 system packages. Only meaningful if external dependency handling is
22 enabled.
23
24 -b, --keep-build-dir
25 Keep the build directories after compiling packages. This is
26 equivalent to setting $OPAMKEEPBUILDDIR to "true".
27
28 --build-doc
29 Removed in 2.1, use --with-doc instead.
30
31 --build-test
32 Removed in 2.1, use --with-test instead.
33
34 -d, --with-doc
35 Build the package documentation. This only affects packages listed
36 on the command-line. This is equivalent to setting $OPAMWITHDOC (or
37 the deprecated $OPAMBUILDDOC) to "true".
38
39 --dry-run
40 Simulate the command, but don't actually perform any changes. This
41 also can be set with environment variable $OPAMDEBUG.
42
43 --fake
44 This option registers the actions into the opam database, without
45 actually performing them. WARNING: This option is dangerous and
46 likely to break your opam environment. You probably want --dry-run.
47 You've been warned.
48
49 --ignore-constraints-on[=PACKAGES] (default=)
50 Forces opam to ignore version constraints on all dependencies to
51 the listed packages. This can be used to test compatibility, but
52 expect builds to break when using this. Note that version
53 constraints on optional dependencies and conflicts are unaffected.
54 This is equivalent to setting $OPAMIGNORECONSTRAINTS.
55
56 --inplace-build
57 When compiling a package which has its source bound to a local
58 directory, process the build and install actions directly in that
59 directory, rather than in a clean copy handled by opam. This only
60 affects packages that are explicitly listed on the command-line.
61 This is equivalent to setting $OPAMINPLACEBUILD to "true".
62
63 --lock-suffix=SUFFIX (absent=locked)
64 Set locked files suffix to SUFFIX.
65
66 --locked
67 In commands that use opam files found from pinned sources, if a
68 variant of the file with an added .locked extension is found (e.g.
69 foo.opam.locked besides foo.opam), that will be used instead. This
70 is typically useful to offer a more specific set of dependencies
71 and reproduce similar build contexts, hence the name. The
72 lockoption can be used to generate such files, based on the
73 versions of the dependencies currently installed on the host. This
74 is equivalent to setting the $OPAMLOCKED environment variable. Note
75 that this option doesn't generally affect already pinned packages.
76
77 -m MAKE, --make=MAKE
78 Removed in 2.1, use opam config set[-global] make MAKE instead.
79
80 --no-checksums
81 Do not verify the checksum of downloaded archives.This is
82 equivalent to setting $OPAMNOCHECKSUMS to "true".
83
84 --no-depexts
85 Temporarily disables handling of external dependencies. This can be
86 used if a package is not available on your system package manager,
87 but you installed the required dependency by hand. Implies
88 --assume-depexts, and stores the exceptions upon success as well.
89
90 --require-checksums
91 Reject the installation of packages that don't provide a checksum
92 for the upstream archives. This is equivalent to setting
93 $OPAMREQUIRECHECKSUMS to "true".
94
95 --reuse-build-dir
96 Reuse existing build directories (kept by using --keep-build-dir),
97 instead of compiling from a fresh clone of the source. This can be
98 faster, but also lead to failures if the build systems of the
99 packages don't handle upgrades of dependencies well. This is
100 equivalent to setting $OPAMREUSEBUILDDIR to "true".
101
102 --show-actions
103 Call the solver and display the actions. Don't perform any changes.
104 This is equivalent to setting $OPAMSHOW.
105
106 --skip-updates
107 When running an install, upgrade or reinstall on source-pinned
108 packages, they are normally updated from their origin first. This
109 flag disables that behaviour and will keep them to their version in
110 cache. This is equivalent to setting $OPAMSKIPUPDATE.
111
112 -t, --with-test
113 Build and run the package unit-tests. This only affects packages
114 listed on the command-line. This is equivalent to setting
115 $OPAMWITHTEST (or the deprecated $OPAMBUILDTEST) to "true".
116
117 --unlock-base
118 Removed in 2.1, use --update-invariant instead.
119
120 --update-invariant
121 Allow changes to the packages set as switch base (typically, the
122 main compiler). Use with caution. This is equivalent to setting the
123 $OPAMUNLOCKBASE environment variable
124
126 PACKAGES
127 List of package names, with an optional version or constraint, e.g
128 `pkg', `pkg.1.0' or `pkg>=0.5' ; or directory names containing
129 package description, with explicit directory (e.g. `./srcdir' or
130 `.')
131
133 -a, --auto-remove
134 Remove all the packages which have not been explicitly installed
135 and which are not necessary anymore. It is possible to prevent the
136 removal of an already-installed package by running opam install
137 <pkg> --set-root. This flag can also be set using the
138 $OPAMAUTOREMOVE configuration variable.
139
140 --destdir=DIR
141 Instead of uninstalling the packages, reverts the action of opam
142 install --destdir: remove files corresponding to what the listed
143 packages installed to the current switch from the given DIR. Note
144 that the package needs to still be installed to the same version
145 that was used for install --destdir for this to work reliably. The
146 packages are not removed from the current opam switch when this is
147 specified.
148
149 --force
150 Execute the remove commands of given packages directly, even if
151 they are not considered installed by opam.
152
153 -j JOBS, --jobs=JOBS
154 Set the maximal number of concurrent jobs to use. The default value
155 is calculated from the number of cores. You can also set it using
156 the $OPAMJOBS environment variable.
157
158 --no
159 Answer no to all opam yes/no questions without prompting. See also
160 --confirm-level. This is equivalent to setting $OPAMNO to "true".
161
162 -y, --yes
163 Answer yes to all opam yes/no questions without prompting. See also
164 --confirm-level. This is equivalent to setting $OPAMYES to "true".
165
167 These options are common to all commands.
168
169 --best-effort
170 Don't fail if all requested packages can't be installed: try to
171 install as many as possible. Note that not all external solvers may
172 support this option (recent versions of aspcud or mccs should).
173 This is equivalent to setting $OPAMBESTEFFORT environment variable.
174
175 --cli=MAJOR.MINOR (absent=2.1)
176 Use the command-line interface syntax and semantics of MAJOR.MINOR.
177 Intended for any persistent use of opam (scripts, blog posts,
178 etc.), any version of opam in the same MAJOR series will behave as
179 for the specified MINOR release. The flag was not available in opam
180 2.0, so to select the 2.0 CLI, set the OPAMCLI environment variable
181 to 2.0 instead of using this parameter.
182
183 --color=WHEN
184 Colorize the output. WHEN must be one of always, never or auto.
185
186 --confirm-level=LEVEL
187 Confirmation level, LEVEL must be one of ask, no, yes or
188 unsafe-yes. Can be specified more than once. If --yes or --no are
189 also given, the value of the last --confirm-level is taken into
190 account. This is equivalent to setting $OPAMCONFIRMLEVEL`.
191
192 --criteria=CRITERIA
193 Specify user preferences for dependency solving for this run.
194 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
195 on the supported language, and the external solvers available, see
196 http://opam.ocaml.org/doc/External_solvers.html. A general guide to
197 using solver preferences can be found at
198 http://www.dicosmo.org/Articles/usercriteria.pdf.
199
200 --cudf=FILENAME
201 Debug option: Save the CUDF requests sent to the solver to
202 FILENAME-<n>.cudf.
203
204 --debug
205 Print debug message to stderr. This is equivalent to setting
206 $OPAMDEBUG to "true".
207
208 --debug-level=LEVEL
209 Like --debug, but allows specifying the debug level (--debug sets
210 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
211
212 --git-version
213 Print the git version of opam, if set (i.e. you are using a
214 development version), and exit.
215
216 --help[=FMT] (default=auto)
217 Show this help in format FMT. The value FMT must be one of auto,
218 pager, groff or plain. With auto, the format is pager or plain
219 whenever the TERM env var is dumb or undefined.
220
221 --ignore-pin-depends
222 Ignore extra pins required by packages that get pinned, either
223 manually through opam pin or through opam install DIR. This is
224 equivalent to setting IGNOREPINDEPENDS=true.
225
226 --json=FILENAME
227 Save the results of the opam run in a computer-readable file. If
228 the filename contains the character `%', it will be replaced by an
229 index that doesn't overwrite an existing file. Similar to setting
230 the $OPAMJSON variable.
231
232 --no-aspcud
233 Removed in 2.1.
234
235 --no-auto-upgrade
236 When configuring or updating a repository that is written for an
237 earlier opam version (1.2), opam internally converts it to the
238 current format. This disables this behaviour. Note that
239 repositories should define their format version in a 'repo' file at
240 their root, or they will be assumed to be in the older format. It
241 is, in any case, preferable to upgrade the repositories manually
242 using opam admin upgrade [--mirror URL] when possible.
243
244 --no-self-upgrade
245 Opam will replace itself with a newer binary found at OPAMROOT/opam
246 if present. This disables this behaviour.
247
248 -q, --quiet
249 Disables --verbose.
250
251 --root=ROOT
252 Use ROOT as the current root path. This is equivalent to setting
253 $OPAMROOT to ROOT.
254
255 --safe, --readonly
256 Make sure nothing will be automatically updated or rewritten.
257 Useful for calling from completion scripts, for example. Will fail
258 whenever such an operation is needed ; also avoids waiting for
259 locks, skips interactive questions and overrides the $OPAMDEBUG
260 variable. This is equivalent to set environment variable $OPAMSAFE.
261
262 --solver=CMD
263 Specify the CUDF solver to use for resolving package installation
264 problems. This is either a predefined solver (this version of opam
265 supports builtin-mccs+lp(), builtin-mccs+glpk,
266 builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
267 mccs, aspcud-old, packup), or a custom command that should contain
268 the variables %{input}%, %{output}%, %{criteria}%, and optionally
269 %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
270
271 --strict
272 Fail whenever an error is found in a package definition or a
273 configuration file. The default is to continue silently if
274 possible.
275
276 --switch=SWITCH
277 Use SWITCH as the current compiler switch. This is equivalent to
278 setting $OPAMSWITCH to SWITCH.
279
280 --use-internal-solver
281 Disable any external solver, and use the built-in one (this
282 requires that opam has been compiled with a built-in solver). This
283 is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
284
285 -v, --verbose
286 Be more verbose. One -v shows all package commands, repeat to also
287 display commands called internally (e.g. tar, curl, patch etc.)
288 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
289
290 --version
291 Show version information.
292
293 -w, --working-dir
294 Whenever updating packages that are bound to a local,
295 version-controlled directory, update to the current working state
296 of their source instead of the last committed state, or the ref
297 they are pointing to. As source directory is copied as it is, if it
298 isn't clean it may result on a opam build failure.This only affects
299 packages explicitly listed on the command-line.It can also be set
300 with $OPAMWORKINGDIR.
301
303 Opam makes use of the environment variables listed here. Boolean
304 variables should be set to "0", "no", "false" or the empty string to
305 disable, "1", "yes" or "true" to enable.
306
307 OPAMALLPARENS surround all filters with parenthesis.
308
309 OPAMASSUMEDEPEXTS see option `--assume-depexts'.
310
311 OPAMAUTOREMOVE see remove option `--auto-remove'.
312
313 OPAMBESTEFFORT see option `--best-effort'.
314
315 OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
316 the criteria when the `--best-effort' option is set, and is expected to
317 maximise the `opam-query' property in the solution.
318
319 OPAMBUILDDOC Removed in 2.1.
320
321 OPAMBUILDTEST Removed in 2.1.
322
323 OPAMCLI see option `--cli'.
324
325 OPAMCOLOR when set to always or never, sets a default value for the
326 `--color' option.
327
328 OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
329 priority over OPAMYES and OPAMNO.
330
331 OPAMCRITERIA specifies user preferences for dependency solving. The
332 default value depends on the solver version, use `config report' to
333 know the current setting. See also option --criteria.
334
335 OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
336
337 OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
338 preprocessing.
339
340 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
341 for more options.
342
343 OPAMDEBUG see options `--debug' and `--debug-level'.
344
345 OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
346 list of sections. Sections can optionally have a specific debug level
347 (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
348 `--debug-level'.
349
350 OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
351 CUDF preprocessing is.
352
353 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
354
355 OPAMDROPWORKINGDIR overrides packages previously updated with
356 --working-dir on update. Without this variable set, opam would keep
357 them unchanged unless explicitly named on the command-line.
358
359 OPAMDRYRUN see option `--dry-run'.
360
361 OPAMEDITOR sets the editor to use for opam file editing, overrides
362 $EDITOR and $VISUAL.
363
364 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
365 fails. 0 to print all.
366
367 OPAMEXTERNALSOLVER see option `--solver'.
368
369 OPAMFAKE see option `--fake'.
370
371 OPAMFETCH specifies how to download files: either `wget', `curl' or a
372 custom command where variables %{url}%, %{out}%, %{retry}%,
373 %{compress}% and %{checksum}% will be replaced. Overrides the
374 'download-command' value from the main config file.
375
376 OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
377
378 OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
379
380 OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
381
382 OPAMINPLACEBUILD see option `--inplace-build'.
383
384 OPAMJOBS sets the maximum number of parallel workers to run.
385
386 OPAMJSON log json output to the given file (use character `%' to index
387 the files).
388
389 OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
390
391 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
392 some backups. This skips some finalisers and may also help to get more
393 reliable backtraces.
394
395 OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
396
397 OPAMLOGS logdir sets log directory, default is a temporary directory in
398 /tmp
399
400 OPAMMAKECMD set the system make command to use.
401
402 OPAMMERGEOUT merge process outputs, stderr on stdout.
403
404 OPAMNO answer no to any question asked, see options `--no` and
405 `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
406 OPAMYES is set.
407
408 OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
409
410 OPAMNOASPCUD Deprecated.
411
412 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
413 in an earlier format to the current one, on 'update' or 'init'.
414
415 OPAMNOCHECKSUMS enables option --no-checksums when available.
416
417 OPAMNODEPEXTS disables system dependencies handling, see option
418 `--no-depexts'.
419
420 OPAMNOENVNOTICE Internal.
421
422 OPAMNOSELFUPGRADE see option `--no-self-upgrade'
423
424 OPAMPINKINDAUTO sets whether version control systems should be detected
425 when pinning to a local path. Enabled by default since 1.3.0.
426
427 OPAMPRECISETRACKING fine grain tracking of directories.
428
429 OPAMPREPRO set this to false to disable CUDF preprocessing. Less
430 efficient, but might help debugging solver issue.
431
432 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
433 available (e.g. for `opam install').
434
435 OPAMRETRIES sets the number of tries before failing downloads.
436
437 OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
438
439 OPAMROOT see option `--root'. This is automatically set by `opam env
440 --root=DIR --set-root'.
441
442 OPAMROOTISOK don't complain when running as root.
443
444 OPAMSAFE see option `--safe'.
445
446 OPAMSHOW see option `--show'.
447
448 OPAMSKIPUPDATE see option `--skip-updates'.
449
450 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
451 compatibility testing only.
452
453 OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
454 return a solution when they reach timeout; while the solution remains
455 assured to be consistent, there is no guarantee in this case that it
456 fits the expected optimisation criteria. If `true', opam willcontinue
457 with a warning, if `false' a timeout is an error. Currently only the
458 builtin-z3 backend handles this degraded case.
459
460 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
461 60.0, set to 0 for unlimited. Note that all solvers may not support
462 this option.
463
464 OPAMSTATS display stats at the end of command.
465
466 OPAMSTATUSLINE display a dynamic status line showing what's currently
467 going on on the terminal. (one of one of always, never or auto)
468
469 OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
470
471 OPAMSWITCH see option `--switch'. Automatically set by `opam env
472 --switch=SWITCH --set-switch'.
473
474 OPAMUNLOCKBASE see install option `--unlock-base'.
475
476 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
477 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
478 are set. See also option --criteria.
479
480 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
481
482 OPAMUSEOPENSSL force openssl use for hash computing.
483
484 OPAMUTF8 use UTF8 characters in output (one of one of always, never or
485 auto). By default `auto', which is determined from the locale).
486
487 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
488 Implies OPAMUTF8. This is set by default on OSX only.
489
490 OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
491 opam repository update.
492
493 OPAMVERBOSE see option `--verbose'.
494
495 OPAMVERSIONLAGPOWER do not use.
496
497 OPAMWITHDOC see install option `--with-doc'.
498
499 OPAMWITHTEST see install option `--with-test.
500
501 OPAMWORKINGDIR see option `--working-dir'.
502
503 OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
504 priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
505
506 OPAMVAR_var overrides the contents of the variable var when
507 substituting `%{var}%` strings in `opam` files.
508
509 OPAMVAR_package_var overrides the contents of the variable package:var
510 when substituting `%{package:var}%` strings in `opam` files.
511
513 All scripts and programmatic invocations of opam should use `--cli' in
514 order to ensure that they work seamlessly with future versions of the
515 opam client. Additionally, blog posts or other documentation can
516 benefit, as it prevents information from becoming stale.
517
518 Although opam only supports roots (~/.opam/) for the current version,
519 it does provide backwards compatibility for its command-line interface.
520
521 Since CLI version support was only added in opam 2.1, use OPAMCLI to
522 select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
523 for 2.1 (or later) versions, since an environment variable controlling
524 the parsing of syntax is brittle. To this end, opam displays a warning
525 if OPAMCLI specifies a valid version other than 2.0, and also if
526 `--cli=2.0' is specified.
527
528 The command-line version is selected by using the `--cli' option or the
529 OPAMCLI environment variable. `--cli' may be specified morethan once,
530 where the last instance takes precedence. OPAMCLI is only inspected if
531 `--cli' is not given.
532
534 As an exception to the following, the `exec' command returns 127 if the
535 command was not found or couldn't be executed, and the command's exit
536 value otherwise.
537
538 0 Success, or true for boolean queries.
539
540 1 False. Returned when a boolean return value is expected, e.g. when
541 running with --check, or for queries like opam lint.
542
543 2 Bad command-line arguments, or command-line arguments pointing to
544 an invalid context (e.g. file not following the expected format).
545
546 5 Not found. You requested something (package, version, repository,
547 etc.) that couldn't be found.
548
549 10 Aborted. The operation required confirmation, which wasn't given.
550
551 15 Could not acquire the locks required for the operation.
552
553 20 There is no solution to the user request. This can be caused by
554 asking to install two incompatible packages, for example.
555
556 30 Error in package definition, or other metadata files. Using
557 --strict raises this error more often.
558
559 31 Package script error. Some package operations were unsuccessful.
560 This may be an error in the packages or an incompatibility with
561 your system. This can be a partial error.
562
563 40 Sync error. Could not fetch some remotes from the network. This can
564 be a partial error.
565
566 50 Configuration error. Opam or system configuration doesn't allow
567 operation, and needs fixing.
568
569 60 Solver failure. The solver failed to return a sound answer. It can
570 be due to a broken external solver, or an error in solver
571 configuration.
572
573 99 Internal error. Something went wrong, likely due to a bug in opam
574 itself.
575
576 130 User interrupt. SIGINT was received, generally due to the user
577 pressing Ctrl-C.
578
580 See https://opam.ocaml.org/doc.
581
583 Vincent Bernardoff <vb@luminar.eu.org>
584 Raja Boujbel <raja.boujbel@ocamlpro.com>
585 Roberto Di Cosmo <roberto@dicosmo.org>
586 Thomas Gazagnaire <thomas@gazagnaire.org>
587 Louis Gesbert <louis.gesbert@ocamlpro.com>
588 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
589 Anil Madhavapeddy <anil@recoil.org>
590 Guillem Rieu <guillem.rieu@ocamlpro.com>
591 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
592 Frederic Tuong <tuong@users.gforge.inria.fr>
593
595 Check bug reports at https://github.com/ocaml/opam/issues.
596
597
598
599Opam 2.1.5 OPAM-UNINSTALL(1)