Unofficial APT repository for the Zig programming language on Ubuntu.
Install and update Zig like any other system package — no manual downloads, no PATH hacks.
# 1. Add the GPG key
curl -fsSL https://javanile.org/zig-ppa/ubuntu/key.gpg \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/zig-ppa.gpg > /dev/null
# 2. Add the repository (replace "focal" with your Ubuntu codename)
echo "deb [signed-by=/usr/share/keyrings/zig-ppa.gpg] https://javanile.org/zig-ppa/ubuntu focal main" \
| sudo tee /etc/apt/sources.list.d/zig-ppa.list
# 3. Install Zig
sudo apt update
sudo apt install zigYour Ubuntu codename? Run
lsb_release -csto find out.
sudo apt install zig=0.13.0-1zig version| Ubuntu release | Codename | amd64 | arm64 |
|---|---|---|---|
| Ubuntu 24.04 LTS | noble | yes | yes |
| Ubuntu 22.04 LTS | jammy | yes | yes |
| Ubuntu 20.04 LTS | focal | yes | yes |
ziglang.org/download/ GitHub Actions (build.yml)
│ │
│ official tarball │ build-deb.sh
└──────────────────────────────►│
│ dpkg-buildpackage
│
▼
ubuntu/pool/main/z/zig/
ubuntu/dists/<codename>/
│
│ ubuntu-packages.sh
│ (Packages + Release + GPG sign)
│
▼
https://javanile.org/zig-ppa/ubuntu/
- Build —
scripts/build-deb.sh <version>downloads the official upstream tarball, verifies its SHA256 against ziglang.org/download/index.json, and builds a.debwithdpkg-buildpackage. - Publish —
scripts/ubuntu-packages.shregeneratesPackages,Release,InRelease, andRelease.gpgfor each supported Ubuntu release and places them underubuntu/dists/. - Serve — the
ubuntu/directory is served as a static site via GitHub Pages athttps://javanile.org/zig-ppa/ubuntu/.
debian/ Debian packaging templates (control, rules, zig.install …)
scripts/
build-deb.sh Build a .deb for a given Zig version
ubuntu-packages.sh Regenerate APT index files and GPG signatures
ubuntu-gpg-key.sh Generate / renew the repository signing key
tests/ubuntu/
Dockerfile Docker-based end-to-end install test
test-local.sh Run the full install test on this machine
ubuntu/
key.gpg Repository public key (add this to your keyring)
sources.list Example sources.list for users
pool/main/z/zig/ .deb packages
dists/<codename>/ APT index files (generated)
.github/workflows/
ubuntu.yml Matrix CI: Zig version × Ubuntu codename
Pull requests are welcome. To add a new Zig version:
- Run
./scripts/build-deb.sh <new-version>locally. - Run
./scripts/ubuntu-packages.shto regenerate the index. - Add the new version pairs to the matrix in
.github/workflows/ubuntu.yml. - Open a PR — CI will validate the install on all supported distros.
To test locally before opening a PR:
sudo bash tests/ubuntu/test-local.sh <version>Francesco Bianco — bianco@javanile.org
Original packaging by Arto Bendiken.
Zig is developed by the Zig Software Foundation.
This repository is not affiliated with or endorsed by the Zig project.