NIX-STORE-REPAIR-PATH(1)

πŸ“¦
version 2.35.3 Β· 3 versions
, in alpine 3.24, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 πŸ’‹ πŸŽ€βœ¨πŸ¦‹πŸ’–