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 -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.
29
30 --fake
31 This option registers the actions into the opam database, without
32 actually performing them. WARNING: This option is dangerous and
33 likely to break your opam environment. You probably want
34 `--dry-run'. You've been warned.
35
36 --ignore-constraints-on[=PACKAGES] (default=)
37 Forces opam to ignore version constraints on all dependencies to
38 the listed packages. This can be used to test compatibility, but
39 expect builds to break when using this. Note that version
40 constraints on optional dependencies and conflicts are unaffected.
41
42 --inplace-build
43 When compiling a package which has its source bound to a local
44 directory, process the build and install actions directly in that
45 directory, rather than in a clean copy handled by opam. This only
46 affects packages that are explicitly listed on the command-line.
47 This is equivalent to setting $OPAMINPLACEBUILD to "true".
48
49 --locked[=SUFFIX] (default=locked)
50 In commands that use opam files found from pinned sources, if a
51 variant of the file with an added .SUFFIX extension is found (e.g.
52 foo.opam.locked besides foo.opam), that will be used instead. This
53 is typically useful to offer a more specific set of dependencies
54 and reproduce similar build contexts, hence the name. The opam lock
55 plugin can be used to generate such files, based on the versions of
56 the dependencies currently installed on the host. This is
57 equivalent to setting the $OPAMLOCK environment variable. Note that
58 this option doesn't generally affect already pinned packages.
59
60 -m MAKE, --make=MAKE
61 Use MAKE as the default 'make' command. Deprecated: use opam config
62 set[-global] make MAKE instead. Has no effect if the make variable
63 is defined.
64
65 --no-checksums
66 Do not verify the checksum of downloaded archives.This is
67 equivalent to setting $OPAMNOCHECKSUMS to "true".
68
69 --require-checksums
70 Reject the installation of packages that don't provide a checksum
71 for the upstream archives. This is equivalent to setting
72 $OPAMREQUIRECHECKSUMS to "true".
73
74 --reuse-build-dir
75 Reuse existing build directories (kept by using --keep-build-dir),
76 instead of compiling from a fresh clone of the source. This can be
77 faster, but also lead to failures if the build systems of the
78 packages don't handle upgrades of dependencies well. This is
79 equivalent to setting $OPAMREUSEBUILDDIR to "true".
80
81 --show-actions
82 Call the solver and display the actions. Don't perform any changes.
83
84 --skip-updates
85 When running an install, upgrade or reinstall on source-pinned
86 packages, they are normally updated from their origin first. This
87 flag disables that behaviour and will keep them to their version in
88 cache.
89
90 -t, --with-test, --build-test
91 Build and run the package unit-tests. This only affects packages
92 listed on the command-line. The --build-test form is deprecated as
93 this also affects installation. This is equivalent to setting
94 $OPAMWITHTEST (or the deprecated $OPAMBUILDTEST) to "true".
95
96 --unlock-base
97 Allow changes to the packages set as switch base (typically, the
98 main compiler). Use with caution.
99
101 PACKAGES
102 List of package names, with an optional version or constraint, e.g
103 `pkg', `pkg.1.0' or `pkg>=0.5' ; or directory names containing
104 package description, with explicit directory (e.g. `./srcdir' or
105 `.')
106
108 -a, --auto-remove
109 Remove all the packages which have not been explicitly installed
110 and which are not necessary anymore. It is possible to prevent the
111 removal of an already-installed package by running opam install
112 <pkg> --set-root. This flag can also be set using the
113 $OPAMAUTOREMOVE configuration variable.
114
115 --destdir=DIR
116 Instead of uninstalling the packages, reverts the action of opam
117 install --destdir: remove files corresponding to what the listed
118 packages installed to the current switch from the given DIR. Note
119 that the package needs to still be installed to the same version
120 that was used for install --destdir for this to work reliably. The
121 packages are not removed from the current opam switch when this is
122 specified.
123
124 --force
125 Execute the remove commands of given packages directly, even if
126 they are not considered installed by opam.
127
128 --help[=FMT] (default=auto)
129 Show this help in format FMT. The value FMT must be one of `auto',
130 `pager', `groff' or `plain'. With `auto', the format is `pager` or
131 `plain' whenever the TERM env var is `dumb' or undefined.
132
133 -j JOBS, --jobs=JOBS
134 Set the maximal number of concurrent jobs to use. The default value
135 is calculated from the number of cores. You can also set it using
136 the $OPAMJOBS environment variable.
137
138 --version
139 Show version information.
140
142 These options are common to all commands.
143
144 --best-effort
145 Don't fail if all requested packages can't be installed: try to
146 install as many as possible. Note that not all external solvers may
147 support this option (recent versions of aspcud or mccs should).
148
149 --color=WHEN
150 Colorize the output. WHEN must be one of `always', `never' or
151 `auto'.
152
153 --criteria=CRITERIA
154 Specify user preferences for dependency solving for this run.
155 Overrides both $OPAMCRITERIA and $OPAMUPGRADECRITERIA. For details
156 on the supported language, and the external solvers available, see
157 http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html. A
158 general guide to using solver preferences can be found at
159 http://www.dicosmo.org/Articles/usercriteria.pdf.
160
161 --cudf=FILENAME
162 Debug option: Save the CUDF requests sent to the solver to
163 FILENAME-<n>.cudf.
164
165 --debug
166 Print debug message to stderr. This is equivalent to setting
167 $OPAMDEBUG to "true".
168
169 --debug-level=LEVEL
170 Like --debug, but allows specifying the debug level (--debug sets
171 it to 1). Equivalent to setting $OPAMDEBUG to a positive integer.
172
173 --git-version
174 Print the git version of opam, if set (i.e. you are using a
175 development version), and exit.
176
177 --ignore-pin-depends
178 Ignore extra pins required by packages that get pinned, either
179 manually through opam pin or through opam install DIR. This is
180 equivalent to setting IGNOREPINDEPENDS=true.
181
182 --json=FILENAME
183 Save the results of the opam run in a computer-readable file. If
184 the filename contains the character `%', it will be replaced by an
185 index that doesn't overwrite an existing file. Similar to setting
186 the $OPAMJSON variable.
187
188 --no-auto-upgrade
189 When configuring or updating a repository that is written for an
190 earlier opam version (1.2), opam internally converts it to the
191 current format. This disables this behaviour. Note that
192 repositories should define their format version in a 'repo' file at
193 their root, or they will be assumed to be in the older format. It
194 is, in any case, preferable to upgrade the repositories manually
195 using opam admin upgrade [--mirror URL] when possible.
196
197 --no-self-upgrade
198 Opam will replace itself with a newer binary found at OPAMROOT/opam
199 if present. This disables this behaviour.
200
201 -q, --quiet
202 Disables --verbose.
203
204 --root=ROOT
205 Use ROOT as the current root path. This is equivalent to setting
206 $OPAMROOT to ROOT.
207
208 --safe, --readonly
209 Make sure nothing will be automatically updated or rewritten.
210 Useful for calling from completion scripts, for example. Will fail
211 whenever such an operation is needed ; also avoids waiting for
212 locks, skips interactive questions and overrides the $OPAMDEBUG
213 variable.
214
215 --solver=CMD
216 Specify the CUDF solver to use for resolving package installation
217 problems. This is either a predefined solver (this version of opam
218 supports builtin-mccs+lp(), builtin-mccs+glpk, aspcud, mccs,
219 aspcud-old, packup), or a custom command that should contain the
220 variables %{input}%, %{output}%, %{criteria}%, and optionally
221 %{timeout}%.
222
223 --strict
224 Fail whenever an error is found in a package definition or a
225 configuration file. The default is to continue silently if
226 possible.
227
228 --switch=SWITCH
229 Use SWITCH as the current compiler switch. This is equivalent to
230 setting $OPAMSWITCH to SWITCH.
231
232 --use-internal-solver, --no-aspcud
233 Disable any external solver, and use the built-in one (this
234 requires that opam has been compiled with a built-in solver).
235
236 -v, --verbose
237 Be more verbose. One -v shows all package commands, repeat to also
238 display commands called internally (e.g. tar, curl, patch etc.)
239 Repeating n times is equivalent to setting $OPAMVERBOSE to "n".
240
241 -w, --working-dir
242 Whenever updating packages that are bound to a local,
243 version-controlled directory, update to the current working state
244 of their source instead of the last committed state, or the ref
245 they are pointing to. This only affects packages explicitly listed
246 on the command-line.
247
248 -y, --yes
249 Answer yes to all yes/no questions without prompting. This is
250 equivalent to setting $OPAMYES to "true".
251
253 Opam makes use of the environment variables listed here. Boolean
254 variables should be set to "0", "no", "false" or the empty string to
255 disable, "1", "yes" or "true" to enable.
256
257 OPAMCOLOR, when set to always or never, sets a default value for the
258 --color option.
259
260 OPAMCRITERIA specifies user preferences for dependency solving. The
261 default value depends on the solver version, use `config report` to
262 know the current setting. See also option --criteria
263
264 OPAMCURL can be used to select a given 'curl' program. See OPAMFETCH
265 for more options.
266
267 OPAMDEBUG see options `--debug' and `--debug-level'.
268
269 OPAMDOWNLOADJOBS sets the maximum number of simultaneous downloads.
270
271 OPAMERRLOGLEN sets the number of log lines printed when a sub-process
272 fails. 0 to print all.
273
274 OPAMEXTERNALSOLVER see option `--solver'.
275
276 OPAMFETCH specifies how to download files: either `wget', `curl' or a
277 custom command where variables %{url}%, %{out}%, %{retry}%,
278 %{compress}% and %{checksum}% will be replaced. Overrides the
279 'download-command' value from the main config file.
280
281 OPAMJOBS sets the maximum number of parallel workers to run.
282
283 OPAMJSON log json output to the given file (use character `%' to index
284 the files)
285
286 OPAMLOCK see option `--lock'.
287
288 OPAMNOAUTOUPGRADE disables automatic internal upgrade of repositories
289 in an earlier format to the current one, on 'update' or 'init'.
290
291 OPAMKEEPLOGS tells opam to not remove some temporary command logs and
292 some backups. This skips some finalisers and may also help to get more
293 reliable backtraces
294
295 OPAMLOCKRETRIES sets the number of tries after which OPAM gives up
296 acquiring its lock and fails. <= 0 means infinite wait.
297
298 OPAMNO answer no to any question asked.
299
300 OPAMNOASPCUD see option `--no-aspcud'.
301
302 OPAMNOSELFUPGRADE see option `--no-self-upgrade'.
303
304 OPAMPINKINDAUTO sets whether version control systems should be detected
305 when pinning to a local path. Enabled by default since 1.3.0.
306
307 OPAMREQUIRECHECKSUMS Enables option `--require-checksums' when
308 available (e.g. for `opam install`).
309
310 OPAMRETRY sets the number of tries before failing downloads.
311
312 OPAMROOT see option `--root'. This is automatically set by `opam env
313 --root=DIR --set-root'.
314
315 OPAMROOTISOK don't complain when running as root.
316
317 OPAMSAFE see option `--safe'
318
319 OPAMSKIPVERSIONCHECKS bypasses some version checks. Unsafe, for
320 compatibility testing only.
321
322 OPAMSOLVERTIMEOUT change the time allowance of the solver. Default is
323 60.0, set to 0 for unlimited. Note that all solvers may not support
324 this option.
325
326 OPAMSTATUSLINE display a dynamic status line showing what's currently
327 going on on the terminal. (one of one of `always', `never' or `auto')
328
329 OPAMSWITCH see option `--switch'. Automatically set by `opam env
330 --switch=SWITCH --set-switch'.
331
332 OPAMUPGRADECRITERIA specifies user preferences for dependency solving
333 when performing an upgrade. Overrides OPAMCRITERIA in upgrades if both
334 are set. See also option --criteria
335
336 OPAMUSEINTERNALSOLVER see option `--use-internal-solver'.
337
338 OPAMUTF8 use UTF8 characters in output (one of one of `always', `never'
339 or `auto'). By default `auto', which is determined from the locale).
340
341 OPAMUTF8MSGS use extended UTF8 characters (camels) in opam messages.
342 Implies OPAMUTF8. This is set by default on OSX only.
343
344 OPAMVAR_var overrides the contents of the variable var when
345 substituting `%{var}%` strings in `opam` files.
346
347 OPAMVAR_package_var overrides the contents of the variable package:var
348 when substituting `%{package:var}%` strings in `opam` files.
349
350 OPAMVERBOSE see option `--verbose'.
351
352 OPAMYES see option `--yes'.
353
355 As an exception to the following, the `exec' command returns 127 if the
356 command was not found or couldn't be executed, and the command's exit
357 value otherwise.
358
359 0 Success, or true for boolean queries.
360
361 1 False. Returned when a boolean return value is expected, e.g. when
362 running with --check, or for queries like opam lint.
363
364 2 Bad command-line arguments, or command-line arguments pointing to
365 an invalid context (e.g. file not following the expected format).
366
367 5 Not found. You requested something (package, version, repository,
368 etc.) that couldn't be found.
369
370 10 Aborted. The operation required confirmation, which wasn't given.
371
372 15 Could not acquire the locks required for the operation.
373
374 20 There is no solution to the user request. This can be caused by
375 asking to install two incompatible packages, for example.
376
377 30 Error in package definition, or other metadata files. Using
378 --strict raises this error more often.
379
380 31 Package script error. Some package operations were unsuccessful.
381 This may be an error in the packages or an incompatibility with
382 your system. This can be a partial error.
383
384 40 Sync error. Could not fetch some remotes from the network. This can
385 be a partial error.
386
387 50 Configuration error. Opam or system configuration doesn't allow
388 operation, and needs fixing.
389
390 60 Solver failure. The solver failed to return a sound answer. It can
391 be due to a broken external solver, or an error in solver
392 configuration.
393
394 99 Internal error. Something went wrong, likely due to a bug in opam
395 itself.
396
397 130 User interrupt. SIGINT was received, generally due to the user
398 pressing Ctrl-C.
399
401 See https://opam.ocaml.org/doc.
402
404 Vincent Bernardoff <vb@luminar.eu.org>
405 Raja Boujbel <raja.boujbel@ocamlpro.com>
406 Roberto Di Cosmo <roberto@dicosmo.org>
407 Thomas Gazagnaire <thomas@gazagnaire.org>
408
409 Louis Gesbert <louis.gesbert@ocamlpro.com>
410 Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
411 Anil Madhavapeddy <anil@recoil.org>
412 Guillem Rieu <guillem.rieu@ocamlpro.com>
413 Ralf Treinen <ralf.treinen@pps.jussieu.fr>
414 Frederic Tuong <tuong@users.gforge.inria.fr>
415
417 Check bug reports at https://github.com/ocaml/opam/issues.
418
419
420
421Opam 2.0.1 opam-uninstall(1)