OPAM(1) Opam Manual OPAM(1)
NNAAMMEE
opam - source-based OCaml package management
SSYYNNOOPPSSIISS
ooppaamm _C_O_M_M_A_N_D ...
DDEESSCCRRIIPPTTIIOONN
OPAM is a package manager for OCaml. It uses the powerful mancoosi
tools to handle dependencies, including support for version
constraints, optional dependencies, and conflict management.
It has support for different remote repositories such as HTTP, rsync,
git, darcs and mercurial. It handles multiple OCaml versions
concurrently, and is flexible enough to allow you to use your own
repositories and packages in addition to the central ones it provides.
Use either ooppaamm <<ccoommmmaanndd>> ----hheellpp or ooppaamm hheellpp <<ccoommmmaanndd>> for more
information on a specific command.
CCOOMMMMAANNDD AALLIIAASSEESS
iinnffoo
An alias for sshhooww.
rreemmoottee
An alias for rreeppoossiittoorryy.
uunniinnssttaallll
An alias for rreemmoovvee.
uunnppiinn
An alias for ppiinn rreemmoovvee.
CCOOMMMMAANNDDSS
ccoonnffiigg
Display configuration options for packages.
hheellpp
Display help about OPAM and OPAM commands.
iinniitt
Initialize OPAM state.
iinnssttaallll
Install a list of packages.
lliinntt
Checks and validate package description ('opam') files.
lliisstt
Display the list of available packages.
ppiinn Pin a given package to a specific version or source.
rreeiinnssttaallll
Reinstall a list of packages.
rreemmoovvee
Remove a list of packages.
rreeppoossiittoorryy
Manage OPAM repositories.
sseeaarrcchh
Search into the package list.
sshhooww
Display information about specific packages.
ssoouurrccee
Get the source of an OPAM package.
sswwiittcchh
Manage multiple installation of compilers.
uuppddaattee
Update the list of available packages.
uuppggrraaddee
Upgrade the installed package to latest version.
CCOOMMMMOONN OOPPTTIIOONNSS
These options are common to all commands.
----ccoolloorr=_W_H_E_N (absent=auto)
Colorize the output. _W_H_E_N must be one of `always', `never' or
`auto'.
----ccrriitteerriiaa=_C_R_I_T_E_R_I_A
Specify user _p_r_e_f_e_r_e_n_c_e_s for dependency solving for this run.
Overrides both $$OOPPAAMMCCRRIITTEERRIIAA and $$OOPPAAMMUUPPGGRRAADDEECCRRIITTEERRIIAA. For details
on the supported language, and the external solvers available, see
_h_t_t_p_:_/_/_o_p_a_m_._o_c_a_m_l_._o_r_g_/_d_o_c_/_S_p_e_c_i_f_y_i_n_g___S_o_l_v_e_r___P_r_e_f_e_r_e_n_c_e_s_._h_t_m_l. A
general guide to using solver preferences can be found at
_h_t_t_p_:_/_/_w_w_w_._d_i_c_o_s_m_o_._o_r_g_/_A_r_t_i_c_l_e_s_/_u_s_e_r_c_r_i_t_e_r_i_a_._p_d_f. The default value
is
-count(down),-count(removed),-notuptodate(solution),-sum(solution,version-lag),-count(new)
for upgrades, and
-count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
otherwise.
----ccuuddff=_F_I_L_E_N_A_M_E
Debug option: Save the CUDF requests sent to the solver to
_F_I_L_E_N_A_M_E-<n>.cudf.
----ddeebbuugg
Print debug message to stderr. This is equivalent to setting
$$OOPPAAMMDDEEBBUUGG to "true".
----ddeebbuugg--lleevveell=_L_E_V_E_L
Like `--debug', but allows specifying the debug level (`--debug'
sets it to 1). Equivalent to setting $$OOPPAAMMDDEEBBUUGG to a positive
integer.
----ggiitt--vveerrssiioonn
Print the git version if it exists and exit.
----hheellpp[=_F_M_T] (default=pager)
Show this help in format _F_M_T (pager, plain or groff).
----nnoo--bbaassee--ppaacckkaaggeess
Do not install base packages (useful for testing purposes). This is
equivalent to setting $$OOPPAAMMNNOOBBAASSEEPPAACCKKAAGGEESS to a non-empty string.
----nnoo--sseellff--uuppggrraaddee
OPAM will replace itself with a newer binary found at OOPPAAMMRROOOOTT//ooppaamm
if present. This disables this behaviour.
--qq, ----qquuiieett
Be quiet when installing a new compiler.
----rroooott=_R_O_O_T (absent=~/.opam)
Use _R_O_O_T as the current root path. This is equivalent to setting
$$OOPPAAMMRROOOOTT to _R_O_O_T.
----ssaaffee
Make sure nothing will be automatically updated or rewritten.
Useful for calling from completion scripts, for example. Will fail
whenever such an operation is needed ; also avoids waiting for
locks, skips interactive questions and overrides the OPAMDEBUG
variable.
----ssoollvveerr=_C_M_D
Specify the name of the external dependency _s_o_l_v_e_r. The default
value is aspcud. Either 'aspcud', 'packup' or a custom command that
may contain the variables %{input}%, %{output}% and %{criteria}%
----ssttrriicctt
Fail whenever an error is found in a package definition or a
configuration file. The default is to continue silently if
possible.
----sswwiittcchh=_S_W_I_T_C_H
Use _S_W_I_T_C_H as the current compiler switch. This is equivalent to
setting $$OOPPAAMMSSWWIITTCCHH to _S_W_I_T_C_H.
----uussee--iinntteerrnnaall--ssoollvveerr, ----nnoo--aassppccuudd
Force use of internal heuristics, even if an external solver is
available.
--vv, ----vveerrbboossee
Be more verbose, show package sub-commands and their output. Repeat
to see more. Repeating _n times is equivalent to setting
$$OOPPAAMMVVEERRBBOOSSEE to "_n".
----vveerrssiioonn
Show version information.
--yy, ----yyeess
Disable interactive mode and answer yes to all questions that would
otherwise be asked to the user. This is equivalent to setting
$$OOPPAAMMYYEESS to "true".
EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
OPAM makes use of the environment variables listed here. Boolean
variables should be set to "0", "no" of "false" to disable, "1", "yes"
or "true" to enable.
_O_P_A_M_C_O_L_O_R, when set to _a_l_w_a_y_s or _n_e_v_e_r, sets a default value for the
--color option.
_O_P_A_M_C_R_I_T_E_R_I_A specifies user _p_r_e_f_e_r_e_n_c_e_s for dependency solving.The
default value is
-count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag).
See also option --criteria
_O_P_A_M_C_U_R_L can be used to select a given 'curl' program. See _O_P_A_M_F_E_T_C_H
for more options.
_O_P_A_M_D_E_B_U_G see options `--debug' and `--debug-level'.
_O_P_A_M_D_O_W_N_L_O_A_D_J_O_B_S sets the maximum number of simultaneous downloads.
_O_P_A_M_E_X_T_E_R_N_A_L_S_O_L_V_E_R see option `--solver'.
_O_P_A_M_F_E_T_C_H specifies how to download files: either `wget', `curl' or a
custom command where variables %%{{uurrll}}%%, %%{{oouutt}}%%, %%{{rreettrriieess}}%%,
%%{{ccoommpprreessss}}%% and %%{{cchheecckkssuumm}}%% will be replaced. Overrides the
'download-command' value from the main config file.
_O_P_A_M_J_O_B_S sets the maximum number of parallel workers to run.
_O_P_A_M_L_O_C_K_R_E_T_R_I_E_S sets the number of tries after which OPAM gives up
acquiring its lock and fails. <= 0 means infinite wait.
_O_P_A_M_N_O answer no to any question asked.
_O_P_A_M_N_O_A_S_P_C_U_D see option `--no-aspcud'.
_O_P_A_M_N_O_S_E_L_F_U_P_G_R_A_D_E see option `--no-self-upgrade'.
_O_P_A_M_P_I_N_K_I_N_D_A_U_T_O if set, version control systems are detected when
pinning to a local path.
_O_P_A_M_R_E_Q_U_I_R_E_C_H_E_C_K_S_U_M_S see option `--require-checksums'.
_O_P_A_M_R_E_T_R_Y sets the number of tries before failing downloads.
_O_P_A_M_R_O_O_T see option `--root'. This is automatically set by `opam config
env --root=DIR' when DIR is non-default or OPAMROOT is already defined.
_O_P_A_M_S_A_F_E see option `--safe'
_O_P_A_M_S_K_I_P_V_E_R_S_I_O_N_C_H_E_C_K_S bypasses some version checks. Unsafe, for
compatibility testing only.
_O_P_A_M_S_O_L_V_E_R_T_I_M_E_O_U_T change the time allowance of the internal solver.
_O_P_A_M_S_T_A_T_U_S_L_I_N_E display a dynamic status line showing what's currently
going on on the terminal. (one of one of `always', `never' or `auto')
_O_P_A_M_S_W_I_T_C_H see option `--switch'. Automatically set by `opam config env
--switch=SWITCH'.
_O_P_A_M_U_P_G_R_A_D_E_C_R_I_T_E_R_I_A specifies user _p_r_e_f_e_r_e_n_c_e_s for dependency solving
when performing an upgrade. Overrides _O_P_A_M_C_R_I_T_E_R_I_A in upgrades if both
are set.The default value is
-count(down),-count(removed),-notuptodate(solution),-sum(solution,version-lag),-count(new).
See also option --criteria
_O_P_A_M_U_S_E_I_N_T_E_R_N_A_L_S_O_L_V_E_R see option `--use-internal-solver'.
_O_P_A_M_U_T_F_8 use UTF8 characters in output (one of one of `always', `never'
or `auto'). By default `auto', which is determined from the locale).
_O_P_A_M_U_T_F_8_M_S_G_S use extended UTF8 characters (camels) in OPAM messages.
Implies _O_P_A_M_U_T_F_8. This is set by default on OSX only.
_O_P_A_M_V_A_R___v_a_r overrides the contents of the variable _v_a_r when
substituting `%{var}%` strings in `opam` files.
_O_P_A_M_V_A_R___p_a_c_k_a_g_e___v_a_r overrides the contents of the variable _p_a_c_k_a_g_e_:_v_a_r
when substituting `%{package:var}%` strings in `opam` files.
_O_P_A_M_V_E_R_B_O_S_E see option `--verbose'.
_O_P_A_M_Y_E_S see option `--yes'.
FFUURRTTHHEERR DDOOCCUUMMEENNTTAATTIIOONN
See https://opam.ocaml.org.
AAUUTTHHOORRSS
Thomas Gazagnaire <thomas@gazagnaire.org>
Anil Madhavapeddy <anil@recoil.org>
Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
Frederic Tuong <tuong@users.gforge.inria.fr>
Louis Gesbert <louis.gesbert@ocamlpro.com>
Vincent Bernardoff <vb@luminar.eu.org>
Guillem Rieu <guillem.rieu@ocamlpro.com>
Roberto Di Cosmo <roberto@dicosmo.org>
BBUUGGSS
Check bug reports at https://github.com/ocaml/opam/issues.
Opam 1.2.2 OPAM(1)