# Install dub with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Build tool for D projects. Version 1.41.0 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:dub
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dub
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dub
```

  Evidence: MacPorts ports tree: devel/dub/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add dub
```

  Evidence: Alpine Linux edge package indexes: dub from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install dub
```

  Evidence: Debian stable package indexes: dub from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install dub
```

  Evidence: Fedora Rawhide package metadata: dub from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#dub
```

  Evidence: nixpkgs package indexes: pkgs/by-name/du/dub/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S dub
```

  Evidence: Arch Linux sync databases: dub from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install dub
```

  Evidence: openSUSE Tumbleweed package metadata: dub from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:dub
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dub>
- **Version:** 1.41.0
- **Source summary:** Build tool for D projects
- **Homepage:** <https://code.dlang.org/getting_started>
- **Repository:** <https://github.com/dlang/dub>
- **Upstream docs:** <https://dub.pm/>
- **License:** MIT
- **Source archive:** <https://github.com/dlang/dub/archive/refs/tags/v1.41.0.tar.gz>
- **Last updated:** 2026-06-22T14:03:12-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dub (cli)
- dub (alias)

## Dependencies

- pkgconf

## Build dependencies

- ldc

## Uses from macOS

- curl

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.41.0
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/dlang/dub
- Upstream latest detected: v1.41.0 (current)
## Project history and usage

DUB is the package and build manager that gave the D language ecosystem a conventional registry-plus-build-tool workflow. It matters because it made reusable D libraries installable and buildable through a shared package description instead of scattered project-specific build scripts.

### Project history

The project describes itself as a package and build manager for D applications and libraries, with a central package registry at code.dlang.org. Its README says DUB emerged as a more general replacement for the package manager originally associated with vibe.d, then expanded from dependency management into building projects and generating IDE project files.

DUB's design center was deliberately small: a short dub.json or later package file, source in a conventional directory, and automatic dependency downloads during builds. That placed it in the same cultural slot as Cargo, npm, or Bundler, but tailored to D's compiler ecosystem and common D project layouts.

### Adoption history

DUB became the normal packaging path for public D libraries because the official registry, documentation, and compiler-facing workflow all point through it. The README records broad packaging support over time, including Homebrew, MacPorts, Chocolatey, Debian/Ubuntu, Arch, Alpine, FreeBSD, and OpenBSD.

Its adoption is also tied to IDE and editor integration. The project documentation notes VisualD project generation and Mono-D support for dub.json, which helped make DUB package metadata double as development-environment metadata.

### How it is used

D developers use DUB to create packages, resolve dependencies, build executables and libraries, run tests, and publish packages to the D package registry. The common workflow is intentionally root-directory based: run dub from a package directory and let the package file describe dependencies and build settings.

DUB also has package-nerd value as an example of a language ecosystem build tool that grew out of a framework-specific need, then became the ecosystem-level package manager.

### Why package nerds care

For package database work, DUB is a high-signal package because it is both a CLI and an ecosystem primitive: the executable is a developer tool, while the project also defines package metadata conventions for the D community.

It is historically interesting because it sits between older makefile-centric compiled-language workflows and newer language-native package managers. DUB made D packages discoverable through a central registry while still respecting multiple D compilers such as DMD, GDC, and LDC.

### Timeline

- 2010s: DUB emerges from vibe.d's package-manager needs and generalizes into a package and build manager for D.
- 2010s: code.dlang.org becomes the central DUB package registry.
- 2017: DUB 1.5 and 1.6 releases appear in the GitHub release history.
- 2020s: DUB remains the documented D package/build workflow and is packaged by mainstream OS package managers.

### Related projects

- vibe.d is central to DUB's origin story because DUB's README names it as the package manager that DUB generalized beyond.
- code.dlang.org is the registry side of the DUB ecosystem; VisualD and Mono-D are related development tools that consumed DUB package metadata.

### Sources

- <https://github.com/dlang/dub>
- <https://dub.pm/>
- <https://dub.pm/getting-started/install>
- <https://github.com/dlang/dub/releases>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal


## Configuration and credential file locations

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.


## Configuration files

- Unix: /var/lib/dub/settings.json, <dub executable folder>/../etc/dub/settings.json, /etc/dub/settings.json, $DUB_HOME/settings.json, $ROOT_PACKAGE_DIR/dub.settings.json
- Windows: %ProgramData%\dub\settings.json, <dub executable folder>\..\etc\dub\settings.json, %DUB_HOME%\settings.json, %ROOT_PACKAGE_DIR%\dub.settings.json
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** dub
- **Version Scheme:** 1
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - dub - 1.40.0-1: normalized package name match | Debian stable package indexes: dub from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Package and build management system for D | https://code.dlang.org/
- Nix - dub: normalized package name match | nixpkgs package indexes: pkgs/by-name/du/dub/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dub - 1.36.0-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: dub from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Package and build management system for D | https://code.dlang.org/
- apk - dub - 1.41.0-r2: normalized package name match | Alpine Linux edge package indexes: dub from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Package and build management system for D | https://code.dlang.org/
- apk - dub-doc - 1.41.0-r2: normalized package name match | Alpine Linux edge package indexes: dub-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Package and build management system for D (documentation) | https://code.dlang.org/
- apk - dub-zsh-completion - 1.41.0-r2: normalized package name match | Alpine Linux edge package indexes: dub-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for dub | https://code.dlang.org/
- dnf - dub - 1.41.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: dub from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Package and build management system for D | https://github.com/dlang/dub
- pacman - dub - 1.41.0-1: normalized package name match | Arch Linux sync databases: dub from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Developer package manager for D programming language | https://github.com/dlang/dub
- zypper - dub - 1.41.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: dub from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Package manager and meta build tool for the D programming language | https://code.dlang.org
- MacPorts - dub: normalized package name match | MacPorts ports tree: devel/dub/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Runtime dependency declared by Homebrew.
- [ldc](https://www.automicvault.com/pkg/brew/ldc/) - Build dependency declared by Homebrew.
- [cabal-install](https://www.automicvault.com/pkg/brew/cabal-install/) - Shares av.db curated category or tags: build-tool, cli, developer-tools, package-management, package-manager.
- [spago](https://www.automicvault.com/pkg/brew/spago/) - Shares av.db curated category or tags: build-tool, cli, developer-tools, package-management, package-manager.
- [akku](https://www.automicvault.com/pkg/brew/akku/) - Shares av.db curated category or tags: cli, developer-tools, package-management, package-manager.
- [ant](https://www.automicvault.com/pkg/brew/ant/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [bower](https://www.automicvault.com/pkg/brew/bower/) - Shares av.db curated category or tags: cli, developer-tools, package-management, package-manager.
- [clib](https://www.automicvault.com/pkg/brew/clib/) - Shares av.db curated category or tags: cli, developer-tools, package-management, package-manager.
- [composer](https://www.automicvault.com/pkg/brew/composer/) - Shares av.db curated category or tags: cli, developer-tools, package-management, package-manager.
- [conan](https://www.automicvault.com/pkg/brew/conan/) - Shares av.db curated category or tags: cli, developer-tools, package-management, package-manager.
- [haskell-stack](https://www.automicvault.com/pkg/brew/haskell-stack/) - Local metadata places this package in an adjacent workflow. Shared terms: build, build-tool, build-tools, cli, developer.

## Combined YAML source

View the package source record on GitHub. [combined/dub.yml](https://github.com/automic-vault/db/blob/main/combined/dub.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
