# Install sparse with Homebrew, apk, apt, dnf, Nix, pacman, zypper

Static C code analysis tool. Version 0.6.4 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:sparse
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install sparse
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add sparse
```

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

- Debian apt (92%):

```sh
sudo apt install sparse
```

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

- dnf (92%):

```sh
sudo dnf install sparse
```

  Evidence: Fedora Rawhide package metadata: sparse 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#sparse
```

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

- pacman (92%):

```sh
sudo pacman -S sparse
```

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

- zypper (92%):

```sh
sudo zypper install sparse
```

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

## Package facts

- **Package key:** brew:sparse
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/sparse>
- **Version:** 0.6.4
- **Source summary:** Static C code analysis tool
- **Homepage:** <https://sparse.wiki.kernel.org/>
- **Repository:** <https://git.kernel.org/pub/scm/devel/sparse/sparse.git>
- **Upstream docs:** <https://sparse.docs.kernel.org/en/latest>
- **License:** MIT
- **Source archive:** <https://mirrors.edge.kernel.org/pub/software/devel/sparse/dist/sparse-0.6.4.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cgcc (cli)
- sparse (cli)
- cgcc (alias)
- sparse (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.6.4
- Local data: ok
- Upstream repository: https://sparse.wiki.kernel.org/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Sparse is a semantic parser and static-analysis tool for C, historically tied to Linux kernel development. It parses much of ANSI C plus many GCC extensions and uses annotations to catch mistakes such as incorrect address-space pointer use.

### Project history

The official documentation says Linus Torvalds started writing Sparse in 2003, initially targeting issues such as mixing user-space and kernel-space pointers. It also records maintainer handoffs to Josh Triplett in 2006, Christopher Li in 2009, and Luc Van Oostenryck in late 2018.

### Adoption history

Sparse's adoption is rooted in kernel and low-level C workflows rather than general application development. Its official documentation points contributors to the linux-sparse mailing list, kernel.org Git repository, release tarballs, and kernel bug tracker, while the supplied package data shows distribution through many Unix package managers.

### How it is used

Users build Sparse from the kernel.org Git repository with `make` and `make install`, or install it from a system package manager. The `sparse` analyzer and `cgcc` wrapper are used to check C code with Sparse's type and annotation system.

### Why package nerds care

Sparse matters to package nerds because it is old-school kernel infrastructure that still behaves like a classic Unix developer tool: source releases, mailing-list development, a kernel.org Git repository, manpage-like docs, and wide distro packaging. It also demonstrates how static-analysis tools become part of build and packaging QA culture.

### Timeline

- 2003: Linus Torvalds started Sparse, according to the official documentation.
- 2006: Josh Triplett became the first maintainer, and v0.1 is listed in the official release notes.
- 2009: Christopher Li became maintainer.
- 2018: Luc Van Oostenryck became maintainer in late 2018.
- 2021: v0.6.4 release listed in official release notes.

### Related projects

- Sparse is closely associated with the Linux kernel, GCC-style C extensions, kernel address-space annotations, and other static-analysis or compiler-front-end tooling for C.

### Sources

- <https://git.kernel.org/pub/scm/devel/sparse/sparse.git/>
- <https://sparse.docs.kernel.org/en/latest/>
- <https://sparse.docs.kernel.org/en/latest/release-notes/index.html>
- input.source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** sparse
- **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:** head, stable

## Other Package-Manager Records

- Debian apt - sparse - 0.6.4-5: normalized package name match | Debian stable package indexes: sparse from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Debian apt - sparse-test-inspect - 0.6.4-5: normalized package name match | Debian stable package indexes: sparse-test-inspect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Nix - sparse: normalized package name match | nixpkgs package indexes: pkgs/by-name/sp/sparse/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - sparse - 0.6.4-4ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: sparse from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Ubuntu apt - sparse-test-inspect - 0.6.4-4ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: sparse-test-inspect from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | semantic parser of source files | https://sparse.wiki.kernel.org/
- apk - sparse - 0.6.4-r2: normalized package name match | Alpine Linux edge package indexes: sparse from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A semantic parser of source files | http://sparse.wiki.kernel.org/
- apk - sparse-doc - 0.6.4-r2: normalized package name match | Alpine Linux edge package indexes: sparse-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A semantic parser of source files (documentation) | http://sparse.wiki.kernel.org/
- dnf - sparse - 0.6.4-4.gce1a6720f69e.fc44.7: normalized package name match | Fedora Rawhide package metadata: sparse from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A semantic parser of source files | https://sparse.wiki.kernel.org
- pacman - sparse - 0.6.5+rc1-2: normalized package name match | Arch Linux sync databases: sparse from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Semantic parser for C | https://sparse.docs.kernel.org/en/latest/
- zypper - sparse - 0.6.4+20240203-1.7: normalized package name match | openSUSE Tumbleweed package metadata: sparse from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A semantic parser of source files | https://sparse.docs.kernel.org/
- zypper - sparse-inspect - 0.6.4+20240203-1.7: normalized package name match | openSUSE Tumbleweed package metadata: sparse-inspect from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Inspect binary from sparse | https://sparse.docs.kernel.org/


## Related links

- [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.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [cflow](https://www.automicvault.com/pkg/brew/cflow/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [cppcheck](https://www.automicvault.com/pkg/brew/cppcheck/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [spoa](https://www.automicvault.com/pkg/brew/spoa/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [checkstyle](https://www.automicvault.com/pkg/brew/checkstyle/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [clazy](https://www.automicvault.com/pkg/brew/clazy/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [credo](https://www.automicvault.com/pkg/brew/credo/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [datadog-static-analyzer](https://www.automicvault.com/pkg/brew/datadog-static-analyzer/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [detekt](https://www.automicvault.com/pkg/brew/detekt/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.

## Combined YAML source

View the package source record on GitHub. [combined/sparse.yml](https://github.com/automic-vault/db/blob/main/combined/sparse.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
