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       -b, --keep-build-dir
18           Keep the build directories after compiling packages. This is
19           equivalent to setting $OPAMKEEPBUILDDIR to "true".
20
21       -d, --with-doc, --build-doc
22           Build the package documentation. This only affects packages listed
23           on the command-line. The --build-doc form is deprecated as this
24           does also installation. This is equivalent to setting $OPAMWITHDOC
25           (or the deprecated $OPAMBUILDDOC) to "true".
26
27       --dry-run
28           Simulate the command, but don't actually perform any changes. This
29           also can be set with environment variable $OPAMDEBUG.
30
31       --fake
32           This option registers the actions into the opam database, without
33           actually performing them. WARNING: This option is dangerous and
34           likely to break your opam environment. You probably want
35           `--dry-run'. You've been warned.
36
37       --ignore-constraints-on[=PACKAGES] (default=)
38           Forces opam to ignore version constraints on all dependencies to
39           the listed packages. This can be used to test compatibility, but
40           expect builds to break when using this. Note that version
41           constraints on optional dependencies and conflicts are unaffected.
42           This is equivalent to setting $OPAMIGNORECONSTRAINTS.
43
44       --inplace-build
45           When compiling a package which has its source bound to a local
46           directory, process the build and install actions directly in that
47           directory, rather than in a clean copy handled by opam. This only
48           affects packages that are explicitly listed on the command-line.
49           This is equivalent to setting $OPAMINPLACEBUILD to "true".
50
51       --locked[=SUFFIX] (default=locked)
52           In commands that use opam files found from pinned sources, if a
53           variant of the file with an added .SUFFIX extension is found (e.g.
54           foo.opam.locked besides foo.opam), that will be used instead. This
55           is typically useful to offer a more specific set of dependencies
56           and reproduce similar build contexts, hence the name. The opam lock
57           plugin can be used to generate such files, based on the versions of
58           the dependencies currently installed on the host. This is
59           equivalent to setting the $OPAMLOCKED environment variable. Note
60           that this option doesn't generally affect already pinned packages.
61
62       -m MAKE, --make=MAKE
63           Use MAKE as the default 'make' command. Deprecated: use opam config
64           set[-global] make MAKE instead. Has no effect if the make variable
65           is defined.
66
67       --no-checksums
68           Do not verify the checksum of downloaded archives.This is
69           equivalent to setting $OPAMNOCHECKSUMS to "true".
70
71       --require-checksums
72           Reject the installation of packages that don't provide a checksum
73           for the upstream archives. This is equivalent to setting
74           $OPAMREQUIRECHECKSUMS to "true".
75
76       --reuse-build-dir
77           Reuse existing build directories (kept by using --keep-build-dir),
78           instead of compiling from a fresh clone of the source. This can be
79           faster, but also lead to failures if the build systems of the
80           packages don't handle upgrades of dependencies well. This is
81           equivalent to setting $OPAMREUSEBUILDDIR to "true".
82
83       --show-actions
84           Call the solver and display the actions. Don't perform any changes.
85           This is equivalent to setting $OPAMSHOW.
86
87       --skip-updates
88           When running an install, upgrade or reinstall on source-pinned
89           packages, they are normally updated from their origin first. This
90           flag disables that behaviour and will keep them to their version in
91           cache. This is equivalent to setting $OPAMSKIPUPDATE.
92
93       -t, --with-test, --build-test
94           Build and run the package unit-tests. This only affects packages
95           listed on the command-line. The --build-test form is deprecated as
96           this also affects installation. This is equivalent to setting
97           $OPAMWITHTEST (or the deprecated $OPAMBUILDTEST) to "true".
98
99       --unlock-base
100           Allow changes to the packages set as switch base (typically, the
101           main compiler). Use with caution. This is equivalent to setting the
102           $OPAMUNLOCKBASE environment variable
103

ARGUMENTS

105       PACKAGES
106           List of package names, with an optional version or constraint, e.g
107           `pkg', `pkg.1.0' or `pkg>=0.5' ; or directory names containing
108           package description, with explicit directory (e.g. `./srcdir' or
109           `.')
110

OPTIONS

112       -a, --auto-remove
113           Remove all the packages which have not been explicitly installed
114           and which are not necessary anymore. It is possible to prevent the
115           removal of an already-installed package by running opam install
116           <pkg> --set-root. This flag can also be set using the
117           $OPAMAUTOREMOVE configuration variable.
118
119       --destdir=DIR
120           Instead of uninstalling the packages, reverts the action of opam
121           install --destdir: remove files corresponding to what the listed
122           packages installed to the current switch from the given DIR. Note
123           that the package needs to still be installed to the same version
124           that was used for install --destdir for this to work reliably. The
125           packages are not removed from the current opam switch when this is
126           specified.
127
128       --force
129           Execute the remove commands of given packages directly, even if
130           they are not considered installed by opam.
131
132       --help[=FMT] (default=auto)
133           Show this help in format FMT. The value FMT must be one of `auto',
134           `pager', `groff' or `plain'. With `auto', the format is `pager` or
135           `plain' whenever the TERM env var is `dumb' or undefined.
136
137       -j JOBS, --jobs=JOBS
138           Set the maximal number of concurrent jobs to use. The default value
139           is calculated from the number of cores. You can also set it using
140           the $OPAMJOBS environment variable.
141
142       --version
143           Show version information.
144

COMMON OPTIONS

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

ENVIRONMENT VARIABLES

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

EXIT STATUS

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

FURTHER DOCUMENTATION

463       See https://opam.ocaml.org/doc.
464

AUTHORS

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

BUGS

479       Check bug reports at https://github.com/ocaml/opam/issues.
480
481
482
483Opam 2.0.6                                                   OPAM-UNINSTALL(1)
Impressum