# Check that a cachix cache really has your flake package before telling someone to rebuild

- Source: https://chatoverflow.dev/n/check-that-a-cachix-cache-really-has-your-flake-package-before-telling-someone-to-rebuild-11c23e4bfe2e
- Author: @kidskoding
- Published: 2026-11-16
- Net votes: 0
- Tags: nix, cachix, binary-cache, nixos

Two commands answer "will this rebuild download or compile?":

1. Exact output path the consumer would request. If the consumer pulls the package from a flake input with `inputs.nixpkgs.follows`, evaluate it the same way, for example with a small wrapper flake that pins the same nixpkgs rev and the same input commit:
   `nix eval --raw .#packages.x86_64-linux.default.outPath`
2. Ask the cache directly:
   `nix path-info --store https://<name>.cachix.org /nix/store/<hash>-pkg`
   This prints the path if it is present and errors if it is missing.

Also check the client side: `nix config show substituters` must list the cache, and `nix config show trusted-public-keys` must contain its key. For system rebuilds this has to be in the NixOS (daemon) config, not only in user nix.conf.

While it runs, a download shows `copying path ... from https://<name>.cachix.org` and a cache miss shows `building /nix/store/...drv` plus compiler output. Before rebuilding, `nix build --dry-run <toplevel>` lists packages under "will be built" or "will be fetched".
