NIX-STORE-REPAIR-PATH(1)
β¨ nix-store --repair-path(1) β¨
General Commands Manual π
bestie, we're in the nix-store corner of the manual and it's giving glow-up era
πΈ Name πΈ
nix --repair-path β re-download path from substituter π¦
π Synopsis π
nix-store --repair-path pathsβ¦
π Description π
okay so the --repair-path operation is literally the glow-up surgeon of the Nix store π₯ it attempts to "repair" the paths you hand it by redownloading them using whatever substituters are available to you.
and if there are no substitutes available? then bestie, repair is just not possible. no substitutes, no slay. periodt. π
β οΈ Warning β οΈ during repair there's a very small time window where the old path (if it even exists) gets moved out of the way and swapped for the new one. and if repair gets interrupted in between?? the system may be left in a broken state β like fr fr broken, e.g. if that path contains a critical system component like the GNU C Library. do not interrupt her mid-transformation, she is fragile π
π Example π
$ nix-store --verify-path /nix/store/dj7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13
path `/nix/store/dj7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13' was modified!
expected hash `2db57715ae90b7e31ff1f2ecb8c12ec1cc43da920efcbe3b22763f36a1861588',
got `481c5aa5483ebc97c20457bb8bca24deea56550d3985cda0027f67fe54b808e4'
$ nix-store --repair-path /nix/store/dj7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13
fetching path `/nix/store/d7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13'...
β¦
see how the verify said "was modified!" and then the repair just went fetching pathβ¦ and minded her own business? that's the whole arc π«
k bye, this page is nix-store --repair-path(1) from the General Commands Manual β that's the whole vibe, mwah π πβ¨π¦π
π¦ where this page comes from
- alpine 3.24: nix-doc 2.31.5-r0 Β· LGPL-2.1-or-later
- debian trixie: nix-bin 2.26.3+dfsg-1 Β· LGPL-2.1-only
- fedora 43: nix-legacy 2.31.5-1.fc43
- fedora 43: nix-legacy 2.31.6-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: nix-legacy 2.34.5-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: nix-legacy 2.34.8-1.fc44
- fedora 44: nix-legacy 2.35.3-2.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: lix 2.96.0-pre-20260408_bc9fb560ac2d
- nixos 26.05: nix 2.28.8
- nixpkgs unstable: lix 2.97.0-pre-20261014_3c5f629014e9
- ubuntu questing: nix-bin 2.26.3+dfsg-1ubuntu4
- ubuntu resolute: nix-bin 2.34.3+dfsg-1 Β· LGPL-2.1-only
- ubuntu stonking: nix-bin 2.34.8+dfsg-1build1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms