# Install ccache with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, winget, zypper

Object-file caching compiler wrapper. Version 4.13.6 via Homebrew; verified 2026-06-06.

## Install

```sh
sudo av install brew:ccache
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ccache
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ccache
```

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

### Linux

- apk (92%):

```sh
sudo apk add ccache
```

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

- Debian apt (92%):

```sh
sudo apt install ccache
```

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

- dnf (92%):

```sh
sudo dnf install ccache
```

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

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

- pacman (92%):

```sh
sudo pacman -S ccache
```

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

- zypper (92%):

```sh
sudo zypper install ccache
```

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

### Windows

- Chocolatey (92%):

```sh
choco install ccache
```

  Evidence: Chocolatey community package catalog: ccache from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','carbon'

- Scoop (92%):

```sh
scoop install main/ccache
```

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

- winget (92%):

```sh
winget install --id Ccache.Ccache -e
```

  Evidence: Windows Package Manager source index: Ccache.Ccache from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:ccache
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ccache>
- **Version:** 4.13.6
- **Source summary:** Object-file caching compiler wrapper
- **Homepage:** <https://ccache.dev/>
- **Repository:** <https://github.com/ccache/ccache>
- **Upstream docs:** <https://ccache.dev/documentation.html>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://github.com/ccache/ccache/releases/download/v4.13.6/ccache-4.13.6.tar.xz>
- **Last updated:** 2026-06-06T10:04:21Z
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- ccache (cli)
- ccache (alias)

## Dependencies

- blake3
- fmt
- hiredis
- openssl@3
- xxhash
- zstd

## Build dependencies

- asciidoctor
- cmake
- cpp-httplib
- doctest
- pkgconf
- span-lite
- tl-expected

## Install behavior

- Post-install hook: not defined
- Caveats: To install symlinks for compilers that will automatically use ccache, prepend this directory to your PATH: $HOMEBREW_PREFIX/opt/ccache/libexec If this is an upgrade and you have previously added the symlinks to your PATH, you may need to modify it to the path specified above so it points to the current version. NOTE: ccache can prevent some software from compiling. ALSO NOTE: The brew command, by design, will never use ccache.
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 4.13.6
- Package-manager updated: 2026-06-06
- Local data: ok
- Upstream repository: https://github.com/ccache/ccache
- info: No cached GitHub release or tag data was available.
## Project history and usage

Ccache is a compiler cache that speeds up recompilation by caching prior compilations and detecting when the same compilation is being done again.

### Project history

The official credits page says ccache was originally written by Andrew Tridgell, inspired by Erik Thiele's compilercache shell script, and has been developed and maintained by Joel Rosdahl since 2010.

### Adoption history

The official site presents ccache as a cross-platform build accelerator supporting GCC, Clang, MSVC, and similar compilers on Linux, Windows, macOS, and other Unix-like systems. The supplied package facts show broad package-manager availability, including Homebrew, Debian, Fedora, Nix, MacPorts, Chocolatey, Scoop, winget, Alpine, Arch, Ubuntu, and zypper.

### How it is used

Ccache is used by developers and build farms to speed repeated clean builds, branch builds, and shared compilation servers. The manual documents command modes, statistics, automatic cleanup, local and remote storage, cache-specific and directory-specific configuration files, environment variables, and direct/depend modes.

### Why package nerds care

Few developer packages are as visibly package-manager-adjacent as ccache: it is commonly installed globally, inserted ahead of compilers in PATH or build-system variables, and tuned through predictable config files and environment variables. It is also a useful packaging stress test because it wraps many compilers while trying to preserve exact compiler output.

### Timeline

- 2010: Official credits identify Joel Rosdahl as maintainer from this year.
- 2016-06-06: Official news says source code and bug tracking moved to GitHub.
- 2019-04-03: Official news says the website moved to ccache.dev.
- 2026-05-04: Official news lists ccache 4.13.6 as released.

### Related projects

- Erik Thiele's compilercache, GCC, Clang, MSVC, distcc-style compiler-wrapper workflows, and remote cache/storage helpers.

### Sources

- <https://api.github.com/repos/ccache/ccache>
- <https://github.com/ccache/ccache>
- <https://ccache.dev/>
- <https://ccache.dev/documentation.html>
- <https://ccache.dev/manual/4.13.6.html>
- <https://formulae.brew.sh/api/formula/ccache.json>


## Security Notes

narrow executable package without higher-risk signals.

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


## 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

- Linux: $CCACHE_CONFIGPATH, $CCACHE_DIR/ccache.conf, <cache_dir>/ccache.conf, ~/.ccache/ccache.conf, $XDG_CONFIG_HOME/ccache/ccache.conf, ~/.config/ccache/ccache.conf
- macOS: $CCACHE_CONFIGPATH, $CCACHE_DIR/ccache.conf, <cache_dir>/ccache.conf, ~/.ccache/ccache.conf, $XDG_CONFIG_HOME/ccache/ccache.conf, ~/Library/Preferences/ccache/ccache.conf
- Windows: %CCACHE_CONFIGPATH%, %CCACHE_DIR%/ccache.conf, <cache_dir>\ccache.conf, %USERPROFILE%\.ccache\ccache.conf, %LOCALAPPDATA%\ccache\ccache.conf, %APPDATA%\ccache\ccache.conf
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ccache
- **Version Scheme:** 0
- **Revision:** 1
- **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 - ccache - 4.11.2-2: normalized package name match | Debian stable package indexes: ccache from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Compiler cache for fast recompilation of C/C++ code | https://ccache.dev
- Nix - ccache: normalized package name match | nixpkgs package indexes: pkgs/by-name/cc/ccache/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ccache - 4.9.1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: ccache from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Compiler cache for fast recompilation of C/C++ code | https://ccache.dev
- apk - ccache - 4.13.6-r0: normalized package name match | Alpine Linux edge package indexes: ccache from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | fast C/C++ compiler cache | https://ccache.dev/
- apk - ccache-doc - 4.13.6-r0: normalized package name match | Alpine Linux edge package indexes: ccache-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | fast C/C++ compiler cache (documentation) | https://ccache.dev/
- dnf - ccache - 4.13.6-1.fc45: normalized package name match | Fedora Rawhide package metadata: ccache from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C/C++ compiler cache | http://ccache.dev/
- pacman - ccache - 4.13.6-1: normalized package name match | Arch Linux sync databases: ccache from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Compiler cache that speeds up recompilation by caching previous compilations | https://ccache.dev/
- zypper - ccache - 4.13.6-1.1: normalized package name match | openSUSE Tumbleweed package metadata: ccache from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A Fast C/C++ Compiler Cache | https://ccache.dev/
- MacPorts - ccache: normalized package name match | MacPorts ports tree: devel/ccache/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - ccache: normalized package name match | Chocolatey community package catalog: ccache from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','carbon'
- Scoop - main/ccache: normalized package name match | Scoop official bucket manifest trees: bucket/ccache.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Ccache.Ccache: normalized package name match | Windows Package Manager source index: Ccache.Ccache from https://cdn.winget.microsoft.com/cache/source.msix


## 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.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [xxhash](https://www.automicvault.com/pkg/brew/xxhash/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [asciidoctor](https://www.automicvault.com/pkg/brew/asciidoctor/) - Build dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [nuitka](https://www.automicvault.com/pkg/brew/nuitka/) - Popular package that depends on this formula.
- [octobuild](https://www.automicvault.com/pkg/brew/octobuild/) - Shares av.db curated category or tags: build-cache, build-tools, cli, compiler-cache, developer-tools.
- [distcc](https://www.automicvault.com/pkg/brew/distcc/) - Shares av.db curated category or tags: build-tools, c, c-plus-plus, cli, developer-tools.
- [recc](https://www.automicvault.com/pkg/brew/recc/) - Shares av.db curated category or tags: build-tools, c, cli, compiler-cache, developer-tools.
- [aarch64-elf-gcc](https://www.automicvault.com/pkg/brew/aarch64-elf-gcc/) - Shares av.db curated category or tags: c, c-plus-plus, cli, developer-tools, gcc.
- [castxml](https://www.automicvault.com/pkg/brew/castxml/) - Shares av.db curated category or tags: c, c-plus-plus, clang, cli, developer-tools.
- [clang-build-analyzer](https://www.automicvault.com/pkg/brew/clang-build-analyzer/) - Shares av.db curated category or tags: build-tools, clang, cli, developer-tools.
- [compiledb](https://www.automicvault.com/pkg/brew/compiledb/) - Shares av.db curated category or tags: build-tools, clang, cli, developer-tools.
- [samurai](https://www.automicvault.com/pkg/brew/samurai/) - Shares av.db curated category or tags: build-tools, c, cli, developer-tools.
- [rtags](https://www.automicvault.com/pkg/brew/rtags/) - Local package facts share a topical domain. Shared terms: c-plus-plus, clang, cli, developer, developer-tools.

## Combined YAML source

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