macOS
brew install opamlocal Homebrew formula metadata
sudo port install opamMacPorts ports tree · ocaml/opam/Portfile · source: api.github.com
brew
OCaml package manager. Version 2.5.1 via Homebrew; verified 2026-04-15.
install
brew install opamlocal Homebrew formula metadata
sudo port install opamMacPorts ports tree · ocaml/opam/Portfile · source: api.github.com
sudo apk add opamAlpine Linux edge package indexes · opam · source: dl-cdn.alpinelinux.org
sudo apt install opamDebian stable package indexes · opam · source: deb.debian.org
sudo dnf install opamFedora Rawhide package metadata · opam · source: dl.fedoraproject.org
nix profile install nixpkgs#opamnixpkgs package indexes · opam · source: raw.githubusercontent.com
sudo pacman -S opamArch Linux sync databases · opam · source: geo.mirror.pkgbuild.com
sudo zypper install opamopenSUSE Tumbleweed package metadata · opam · source: download.opensuse.org
scoop install main/opamScoop official bucket manifest trees · bucket/opam.json · source: api.github.com
winget install --id OCaml.opam -eWindows Package Manager source index · OCaml.opam · source: cdn.winget.microsoft.com
overview
OCaml package manager
history
opam is the source-based package manager for OCaml. It manages compiler switches, package constraints, solver-backed dependency resolution, and a Git-friendly development workflow, making it both the OCaml ecosystem's package index client and a practical compiler-environment manager.
The opam history published by the project traces the work to OCamlPro and the wider OCaml community in 2012. Thomas Gazagnaire pushed the first public commit in February 2012; constraint-solving work from Roberto Di Cosmo and Pietro Abate helped connect opam with Mancoosi tools such as CUDF and dose; and documentation and website work followed before the public beta.
The first public beta appeared in January 2013, and opam 1.0.0 was announced on March 15, 2013. The 1.0 release added an auto-configuration tool around opam init, shell completion, toplevel script loading, and related setup tasks, which lowered the cost of getting a usable OCaml environment.
The project quickly became more than a package installer. It standardized switch-based OCaml compiler management, package descriptions, solver integration, and repository workflows in a language ecosystem where compiler versions and native dependencies often matter as much as library versions.
Mirage began using opam in June 2012 for custom compiler needs, and the opam-repository grew through community package submissions. Jane Street's Core libraries appeared in the repository in July 2012, Travis CI was integrated into pull-request processing in September 2013, and contributors were contacted in 2013 to relicense repository contributions to CC0 for the move to the ocaml organization.
The package metadata in this batch records opam across many OS package managers, including Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Scoop, Ubuntu, WinGet, and openSUSE. That broad packaging footprint reflects opam's role as the expected bootstrap tool for OCaml development across Unix, macOS, and Windows-oriented environments.
Developers use opam to install OCaml compilers and libraries, create and switch between isolated compiler environments, update package metadata, upgrade installed packages, pin packages from local or remote sources, and reproduce project dependency sets. The homepage's basic workflow is list, install, update, and upgrade; day-to-day OCaml work adds switches and project-local package constraints.
Operators and distribution maintainers care about opam because it bridges source builds, solver constraints, compiler variants, and external system packages. A package can be available in opam while still depending on native libraries provided by Homebrew, apt, pacman, or another host package manager.
opam is one of the cleaner examples of a language package manager that also manages language runtimes. Its switch model makes compiler selection explicit, and its repository model gives OCaml packages machine-readable metadata while keeping the package index in Git.
For package nerds, opam is important because it makes the hard part visible: OCaml package installation is not just downloading archives, but solving constraints across compiler versions, library packages, build tools, and external dependencies. That is why opam sits naturally in both developer-tools and dependency-management categories.
security posture
infrastructure mutation or orchestration signal.
orange risk · medium confidence · infrastructure
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
~/.opam/config~/.opamrc/etc/opamrcexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
opam | cli | global executable | |
opam-installer | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:opam |
|---|---|
| Version | 2.5.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/opam |
| Homepage | https://opam.ocaml.org |
| Repository | https://github.com/ocaml/opam |
| Upstream docs | https://github.com/ocaml/opam#readme |
| License | LGPL-2.1-only |
| Source archive | https://github.com/ocaml/opam/releases/download/2.5.1/opam-full-2.5.1.tar.gz |
| Last updated | 2026-04-15T23:50:24Z |
| Pulse | updated |
| Dependencies | rsync |
| Build dependencies | ocaml |
| Uses from macOS | unzip |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
| Caveats | OPAM uses ~/.opam by default for its package database, so you need to initialize it first by running: $ opam init |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | opam |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
opam 2.3.0-1+deb13u1
package manager for OCaml
sudo apt install opamopam-doc 2.3.0-1+deb13u1
package manager for OCaml (documentation)
sudo apt install opam-docopam-installer 2.3.0-1+deb13u1
Utility handling (un)installation of Opam .install files
sudo apt install opam-installeropam
nix profile install nixpkgs#opamopam 2.1.5-1
package manager for OCaml
sudo apt install opamopam-doc 2.1.5-1
package manager for OCaml (documentation)
sudo apt install opam-docopam-installer 2.1.5-1
Utility handling (un)installation of Opam .install files
sudo apt install opam-installeropam 2.5.1-r0
OCaml Package Manager
sudo apk add opamopam-doc 2.5.1-r0
OCaml Package Manager (documentation)
sudo apk add opam-docopam 2.5.1-1.fc45
Source-based package manager for OCaml
sudo dnf install opamopam-installer 2.5.1-1.fc45
Standalone script for opam install files
sudo dnf install opam-installeropam 2.5.1-1
OCaml package manager
sudo pacman -S opamopam 2.5.1-1.2
Source-based package manager for OCaml
sudo zypper install opamopam-devel 2.5.1-1.2
Development files for opam
sudo zypper install opam-developam-installer 2.5.1-1.2
Standalone tool for opam install files
sudo zypper install opam-installeropam
sudo port install opamsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.