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

NAME

6       opam-uninstall - An alias for remove.
7

SYNOPSIS

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

DESCRIPTION

12       opam uninstall is an alias for opam remove.
13
14       See opam remove --help for details.
15

PACKAGE BUILD OPTIONS

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

ARGUMENTS

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

OPTIONS

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

COMMON OPTIONS

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
185           `auto'.
186
187       --confirm-level=LEVEL
188           Confirmation level, LEVEL must be one of `ask', `no', `yes' or
189           `unsafe-yes'. Can be specified more than once. If --yes or --no are
190           also given, the value of the last --confirm-level is taken into
191           account. This is equivalent to setting  $OPAMCONFIRMLEVEL`.
192
193       --criteria=CRITERIA
194           Specify user preferences for dependency solving for this run.
195           Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
196           on the supported language, and the external solvers available, see
197           http://opam.ocaml.org/doc/External_solvers.html. A general guide to
198           using solver preferences can be found at
199           http://www.dicosmo.org/Articles/usercriteria.pdf.
200
201       --cudf=FILENAME
202           Debug option: Save the CUDF requests sent to the solver to
203           FILENAME-<n>.cudf.
204
205       --debug
206           Print debug message to stderr. This is equivalent to setting
207           $OPAMDEBUG to "true".
208
209       --debug-level=LEVEL
210           Like --debug, but allows specifying the debug level (--debug sets
211           it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
212
213       --git-version
214           Print the git version of opam, if set (i.e. you are using a
215           development version), and exit.
216
217       --help[=FMT] (default=auto)
218           Show this help in format FMT. The value FMT must be one of `auto',
219           `pager', `groff' or `plain'. With `auto', the format is `pager` or
220           `plain' whenever the TERM env var is `dumb' or undefined.
221
222       --ignore-pin-depends
223           Ignore extra pins required by packages that get pinned, either
224           manually through opam pin or through opam install DIR. This is
225           equivalent to setting IGNOREPINDEPENDS=true.
226
227       --json=FILENAME
228           Save the results of the opam run in a computer-readable file. If
229           the filename contains the character `%', it will be replaced by an
230           index that doesn't overwrite an existing file. Similar to setting
231           the $OPAMJSON variable.
232
233       --no-aspcud
234           Removed in 2.1.
235
236       --no-auto-upgrade
237           When configuring or updating a repository that is written for an
238           earlier opam version (1.2), opam internally converts it to the
239           current format. This disables this behaviour. Note that
240           repositories should define their format version in a 'repo' file at
241           their root, or they will be assumed to be in the older format. It
242           is, in any case, preferable to upgrade the repositories manually
243           using opam admin upgrade [--mirror URL] when possible.
244
245       --no-self-upgrade
246           Opam will replace itself with a newer binary found at OPAMROOT/opam
247           if present. This disables this behaviour.
248
249       -q, --quiet
250           Disables --verbose.
251
252       --root=ROOT
253           Use ROOT as the current root path. This is equivalent to setting
254           $OPAMROOT to ROOT.
255
256       --safe, --readonly
257           Make sure nothing will be automatically updated or rewritten.
258           Useful for calling from completion scripts, for example. Will fail
259           whenever such an operation is needed ; also avoids waiting for
260           locks, skips interactive questions and overrides the $OPAMDEBUG
261           variable. This is equivalent to set environment variable $OPAMSAFE.
262
263       --solver=CMD
264           Specify the CUDF solver to use for resolving package installation
265           problems. This is either a predefined solver (this version of opam
266           supports builtin-mccs+lp(), builtin-mccs+glpk,
267           builtin-dummy-z3-solver, builtin-dummy-0install-solver, aspcud,
268           mccs, aspcud-old, packup), or a custom command that should contain
269           the variables %{input}%, %{output}%, %{criteria}%, and optionally
270           %{timeout}%. This is equivalent to setting $OPAMEXTERNALSOLVER.
271
272       --strict
273           Fail whenever an error is found in a package definition or a
274           configuration file. The default is to continue silently if
275           possible.
276
277       --switch=SWITCH
278           Use SWITCH as the current compiler switch. This is equivalent to
279           setting $OPAMSWITCH to SWITCH.
280
281       --use-internal-solver
282           Disable any external solver, and use the built-in one (this
283           requires that opam has been compiled with a built-in solver). This
284           is equivalent to setting $OPAMNOASPCUD or $OPAMUSEINTERNALSOLVER.
285
286       -v, --verbose
287           Be more verbose. One -v shows all package commands, repeat to also
288           display commands called internally (e.g. tar, curl, patch etc.)
289           Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
290
291       --version
292           Show version information.
293
294       -w, --working-dir
295           Whenever updating packages that are bound to a local,
296           version-controlled directory, update to the current working state
297           of their source instead of the last committed state, or the ref
298           they are pointing to. As source directory is copied as it is, if it
299           isn't clean it may result on a opam build failure.This only affects
300           packages explicitly listed on the command-line.It can also be set
301           with $OPAMWORKINGDIR.
302

ENVIRONMENT

304       Opam makes use of the environment variables listed here. Boolean
305       variables should be set to "0", "no", "false" or the empty string to
306       disable, "1", "yes" or "true" to enable.
307
308       OPAMALLPARENS surround all filters with parenthesis.
309
310       OPAMASSUMEDEPEXTS see option `--assume-depexts'.
311
312       OPAMAUTOREMOVE see remove option `--auto-remove'.
313
314       OPAMBESTEFFORT see option `--best-effort'.
315
316       OPAMBESTEFFORTPREFIXCRITERIA sets the string that must be prepended to
317       the criteria when the `--best-effort' option is set, and is expected to
318       maximise the `opam-query' property in the solution.
319
320       OPAMBUILDDOC Removed in 2.1.
321
322       OPAMBUILDTEST Removed in 2.1.
323
324       OPAMCLI see option `--cli'.
325
326       OPAMCOLOR when set to always or never, sets a default value for the
327       `--color' option.
328
329       OPAMCONFIRMLEVEL see option `--confirm-level`. OPAMCONFIRMLEVEL has
330       priority over OPAMYES and OPAMNO.
331
332       OPAMCRITERIA specifies user preferences for dependency solving. The
333       default value depends on the solver version, use `config report' to
334       know the current setting. See also option --criteria.
335
336       OPAMCUDFFILE save the cudf graph to file-actions-explicit.dot.
337
338       OPAMCUDFTRIM controls the filtering of unrelated packages during CUDF
339       preprocessing.
340
341       OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
342       for more options.
343
344       OPAMDEBUG see options `--debug' and `--debug-level'.
345
346       OPAMDEBUGSECTIONS if set, limits debug messages to the space-separated
347       list of sections. Sections can optionally have a specific debug level
348       (for example, CLIENT:2 or CLIENT CUDF:2), but otherwise use
349       `--debug-level'.
350
351       OPAMDIGDEPTH defines how aggressive the lookup for conflicts during
352       CUDF preprocessing is.
353
354       OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
355
356       OPAMDROPWORKINGDIR overrides packages previously updated with
357       --working-dir on update. Without this variable set, opam would keep
358       them unchanged unless explicitly named on the command-line.
359
360       OPAMDRYRUN see option `--dry-run'.
361
362       OPAMEDITOR sets the editor to use for opam file editing, overrides
363       $EDITOR and $VISUAL.
364
365       OPAMERRLOGLEN sets the number of log lines printed when a sub-process
366       fails. 0 to print all.
367
368       OPAMEXTERNALSOLVER see option `--solver'.
369
370       OPAMFAKE see option `--fake'.
371
372       OPAMFETCH specifies how to download files: either `wget', `curl' or a
373       custom command where variables %{url}%, %{out}%, %{retry}%,
374       %{compress}% and %{checksum}% will be replaced. Overrides the
375       'download-command' value from the main config file.
376
377       OPAMFIXUPCRITERIA same as OPAMUPGRADECRITERIA, but specific to fixup.
378
379       OPAMIGNORECONSTRAINTS see install option `--ignore-constraints-on'.
380
381       OPAMIGNOREPINDEPENDS see option `--ignore-pin-depends'.
382
383       OPAMINPLACEBUILD see option `--inplace-build'.
384
385       OPAMJOBS sets the maximum number of parallel workers to run.
386
387       OPAMJSON log json output to the given file (use character `%' to index
388       the files).
389
390       OPAMKEEPBUILDDIR see install option `--keep-build-dir'.
391
392       OPAMKEEPLOGS tells opam to not remove some temporary command logs and
393       some backups. This skips some finalisers and may also help to get more
394       reliable backtraces.
395
396       OPAMLOCKED combination of `--locked' and `--lock-suffix' options.
397
398       OPAMLOGS logdir sets log directory, default is a temporary directory in
399       /tmp
400
401       OPAMMAKECMD set the system make command to use.
402
403       OPAMMERGEOUT merge process outputs, stderr on stdout.
404
405       OPAMNO answer no to any question asked, see options `--no` and
406       `--confirm-level`. OPAMNO is ignored if either OPAMCONFIRMLEVEL or
407       OPAMYES is set.
408
409       OPAMNOAGGREGATE with `opam admin check', don't aggregate packages.
410
411       OPAMNOASPCUD Deprecated.
412
413       OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
414       in an earlier format to the current one, on 'update' or 'init'.
415
416       OPAMNOCHECKSUMS enables option --no-checksums when available.
417
418       OPAMNODEPEXTS disables system dependencies handling, see option
419       `--no-depexts'.
420
421       OPAMNOENVNOTICE Internal.
422
423       OPAMNOSELFUPGRADE see option `--no-self-upgrade'
424
425       OPAMPINKINDAUTO sets whether version control systems should be detected
426       when pinning to a local path. Enabled by default since 1.3.0.
427
428       OPAMPRECISETRACKING fine grain tracking of directories.
429
430       OPAMPREPRO set this to false to disable CUDF preprocessing. Less
431       efficient, but might help debugging solver issue.
432
433       OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
434       available (e.g. for `opam install').
435
436       OPAMRETRIES sets the number of tries before failing downloads.
437
438       OPAMREUSEBUILDDIR see option `--reuse-build-dir'.
439
440       OPAMROOT see option `--root'. This is automatically set by `opam env
441       --root=DIR --set-root'.
442
443       OPAMROOTISOK don't complain when running as root.
444
445       OPAMSAFE see option `--safe'.
446
447       OPAMSHOW see option `--show'.
448
449       OPAMSKIPUPDATE see option `--skip-updates'.
450
451       OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
452       compatibility testing only.
453
454       OPAMSOLVERALLOWSUBOPTIMAL (default `true') allows some solvers to still
455       return a solution when they reach timeout; while the solution remains
456       assured to be consistent, there is no guarantee in this case that it
457       fits the expected optimisation criteria. If `true', opam willcontinue
458       with a warning, if `false' a timeout is an error. Currently only the
459       builtin-z3 backend handles this degraded case.
460
461       OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
462       60.0, set to 0 for unlimited. Note that all solvers may not support
463       this option.
464
465       OPAMSTATS display stats at the end of command.
466
467       OPAMSTATUSLINE display a dynamic status line showing what's currently
468       going on on the terminal. (one of one of `always', `never' or `auto')
469
470       OPAMSTRICT fail on inconsistencies (file reading, switch import, etc.).
471
472       OPAMSWITCH see option `--switch'. Automatically set by `opam env
473       --switch=SWITCH --set-switch'.
474
475       OPAMUNLOCKBASE see install option `--unlock-base'.
476
477       OPAMUPGRADECRITERIA specifies user preferences for dependency solving
478       when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
479       are set. See also option --criteria.
480
481       OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
482
483       OPAMUSEOPENSSL force openssl use for hash computing.
484
485       OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
486       or `auto'). By default `auto', which is determined from the locale).
487
488       OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
489       Implies OPAMUTF8. This is set by default on OSX only.
490
491       OPAMVALIDATIONHOOK if set, uses the `%{hook%}' command to validate an
492       opam repository update.
493
494       OPAMVERBOSE see option `--verbose'.
495
496       OPAMVERSIONLAGPOWER do not use.
497
498       OPAMWITHDOC see install option `--with-doc'.
499
500       OPAMWITHTEST see install option `--with-test.
501
502       OPAMWORKINGDIR see option `--working-dir'.
503
504       OPAMYES see options `--yes' and `--confirm-level`. OPAMYES has has
505       priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set.
506
507       OPAMVAR_var overrides the contents of the variable var when
508       substituting `%{var}%` strings in `opam` files.
509
510       OPAMVAR_package_var overrides the contents of the variable package:var
511       when substituting `%{package:var}%` strings in `opam` files.
512

CLI VERSION

514       All scripts and programmatic invocations of opam should use `--cli' in
515       order to ensure that they work seamlessly with future versions of the
516       opam client. Additionally, blog posts or other documentation can
517       benefit, as it prevents information from becoming stale.
518
519       Although opam only supports roots (~/.opam/) for the current version,
520       it does provide backwards compatibility for its command-line interface.
521
522       Since CLI version support was only added in opam 2.1, use OPAMCLI to
523       select 2.0 support (as opam 2.0 will just ignore it), and `--cli=2.1'
524       for 2.1 (or later) versions, since an environment variable controlling
525       the parsing of syntax is brittle. To this end, opam displays a warning
526       if OPAMCLI specifies a valid version other than 2.0, and also if
527       `--cli=2.0' is specified.
528
529       The command-line version is selected by using the `--cli' option or the
530       OPAMCLI environment variable. `--cli' may be specified morethan once,
531       where the last instance takes precedence. OPAMCLI is only inspected if
532       `--cli' is not given.
533

EXIT STATUS

535       As an exception to the following, the `exec' command returns 127 if the
536       command was not found or couldn't be executed, and the command's exit
537       value otherwise.
538
539       0   Success, or true for boolean queries.
540
541       1   False. Returned when a boolean return value is expected, e.g. when
542           running with --check, or for queries like opam lint.
543
544       2   Bad command-line arguments, or command-line arguments pointing to
545           an invalid context (e.g. file not following the expected format).
546
547       5   Not found. You requested something (package, version, repository,
548           etc.) that couldn't be found.
549
550       10  Aborted. The operation required confirmation, which wasn't given.
551
552       15  Could not acquire the locks required for the operation.
553
554       20  There is no solution to the user request. This can be caused by
555           asking to install two incompatible packages, for example.
556
557       30  Error in package definition, or other metadata files. Using
558           --strict raises this error more often.
559
560       31  Package script error. Some package operations were unsuccessful.
561           This may be an error in the packages or an incompatibility with
562           your system. This can be a partial error.
563
564       40  Sync error. Could not fetch some remotes from the network. This can
565           be a partial error.
566
567       50  Configuration error. Opam or system configuration doesn't allow
568           operation, and needs fixing.
569
570       60  Solver failure. The solver failed to return a sound answer. It can
571           be due to a broken external solver, or an error in solver
572           configuration.
573
574       99  Internal error. Something went wrong, likely due to a bug in opam
575           itself.
576
577       130 User interrupt. SIGINT was received, generally due to the user
578           pressing Ctrl-C.
579

FURTHER DOCUMENTATION

581       See https://opam.ocaml.org/doc.
582

AUTHORS

584       Vincent Bernardoff <vb@luminar.eu.org>
585       Raja Boujbel <raja.boujbel@ocamlpro.com>
586       Roberto Di Cosmo <roberto@dicosmo.org>
587       Thomas Gazagnaire <thomas@gazagnaire.org>
588       Louis Gesbert <louis.gesbert@ocamlpro.com>
589       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
590       Anil Madhavapeddy <anil@recoil.org>
591       Guillem Rieu <guillem.rieu@ocamlpro.com>
592       Ralf Treinen <ralf.treinen@pps.jussieu.fr>
593       Frederic Tuong <tuong@users.gforge.inria.fr>
594

BUGS

596       Check bug reports at https://github.com/ocaml/opam/issues.
597
598
599
600Opam 2.1.2                                                   OPAM-UNINSTALL(1)
Impressum