# Install dafny with Homebrew, Nix, scoop, apt

Verification-aware programming language. Version 4.11.0 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:dafny
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dafny
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#dafny
```

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

- Ubuntu apt (92%):

```sh
sudo apt install dafny
```

  Evidence: Ubuntu 24.04 LTS package indexes: dafny from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

### Windows

- Scoop (92%):

```sh
scoop install main/dafny
```

  Evidence: Scoop official bucket manifest trees: bucket/dafny.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:dafny
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dafny>
- **Version:** 4.11.0
- **Source summary:** Verification-aware programming language
- **Homepage:** <https://github.com/dafny-lang/dafny/blob/master/README.md>
- **Repository:** <https://github.com/dafny-lang/dafny>
- **Upstream docs:** <https://dafny.org/dafny/DafnyRef/DafnyRef>
- **License:** MIT
- **Source archive:** <https://github.com/dafny-lang/dafny/archive/refs/tags/v4.11.0.tar.gz>
- **Last updated:** 2026-06-22T14:03:07-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dafny (cli)
- dafny (alias)

## Dependencies

- dotnet@8
- z3

## Build dependencies

- gradle@8
- openjdk

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.11.0
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/dafny-lang/dafny
- Upstream latest detected: v4.11.0 (current)
## Project history and usage

Dafny is a verification-aware programming language and toolchain. It occupies a special package-manager niche: a single CLI that lets developers write programs, specifications, and proofs together, then verify them and compile to mainstream languages.

### Project history

The official Dafny README describes Dafny as a verification-ready programming language whose verifier checks code against specifications while the developer writes. The public dafny-lang/dafny repository was created in 2016, and GitHub release metadata records Dafny 1.9.7 in June 2016.

### Adoption history

Dafny has grown through language documentation, binary releases for common operating systems, a wiki and issue tracker, and editor-centered workflows such as Visual Studio Code installation. Its README also points to tutorials, reference material, a Zulip channel, and a standard library, which are typical signs of a specialist language moving from research use into practical developer workflows.

### How it is used

Users write Dafny programs with specifications such as preconditions, postconditions, invariants, and proofs; the Dafny verifier checks them, and the compiler can emit C#, Go, Python, Java, or JavaScript. The reference manual is the authoritative source for the language and verification system.

### Why package nerds care

Dafny matters in package history because it packages formal methods as an installable developer tool rather than a one-off theorem-proving environment. It gives package managers a concrete artifact for a verification language, including CLI binaries, documentation, and cross-platform releases.

### Timeline

- 2016: Public dafny-lang/dafny GitHub repository is created.
- 2016: Dafny 1.9.7 is published on GitHub releases.
- 2017: Dafny 2.0.0 is published on GitHub releases.
- 2025: Dafny 4.11.0 is published on GitHub releases.

### Related projects

- The official README lists influences including Euclid, Eiffel, CLU, Java, C#, Scala, ML, Coq, and VeriFast, and points to Dafny libraries and editor integrations.

### Sources

- <https://github.com/dafny-lang/dafny>
- <https://raw.githubusercontent.com/dafny-lang/dafny/master/README.md>
- <https://dafny.org/dafny/DafnyRef/DafnyRef>
- <https://github.com/dafny-lang/dafny/releases/tag/v1.9.7>


## Security Notes

generalized runtime or code generation signal.

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

## Source Database Details

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

## Other Package-Manager Records

- Nix - dafny: normalized package name match | nixpkgs package indexes: pkgs/by-name/da/dafny/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dafny - 2.3.0+dfsg-0.1: normalized package name match | Ubuntu 24.04 LTS package indexes: dafny from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | programming language with program correctness verifier | https://research.microsoft.com/en-us/projects/dafny/
- Scoop - main/dafny: normalized package name match | Scoop official bucket manifest trees: bucket/dafny.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control 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.
- [dotnet@8](https://www.automicvault.com/pkg/brew/dotnet-8/) - Runtime dependency declared by Homebrew.
- [z3](https://www.automicvault.com/pkg/brew/z3/) - Runtime dependency declared by Homebrew.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Build dependency declared by Homebrew.
- [sby](https://www.automicvault.com/pkg/brew/sby/) - Shares av.db curated category or tags: cli, developer-tools, formal-methods, formal-verification.
- [cbmc](https://www.automicvault.com/pkg/brew/cbmc/) - Shares av.db curated category or tags: cli, developer-tools, formal-verification, static-analysis.
- [proof-general](https://www.automicvault.com/pkg/brew/proof-general/) - Shares av.db curated category or tags: cli, developer-tools, formal-methods.
- [quint](https://www.automicvault.com/pkg/brew/quint/) - Shares av.db curated category or tags: cli, developer-tools, formal-methods.
- [stp](https://www.automicvault.com/pkg/brew/stp/) - Shares av.db curated category or tags: cli, developer-tools, formal-methods.
- [actionlint](https://www.automicvault.com/pkg/brew/actionlint/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [aiken](https://www.automicvault.com/pkg/brew/aiken/) - Shares av.db curated category or tags: cli, developer-tools, programming-language.
- [ccheck](https://www.automicvault.com/pkg/brew/ccheck/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [statix](https://www.automicvault.com/pkg/brew/statix/) - Local package facts share a topical domain. Shared terms: analysis, cli, developer, developer-tools, language.
- [cryptol](https://www.automicvault.com/pkg/brew/cryptol/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, formal, formal-methods.
- [dscanner](https://www.automicvault.com/pkg/brew/dscanner/) - Local package facts share a topical domain. Shared terms: analysis, cli, developer, developer-tools, language.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
