nix3-store-repair(1)
πΈ nix3-store-repair(1) β bestie's guide to fixin' ur store πΈ
Warning π This program is experimental and its interface is subject to change. iykyk. don't get attached to the vibes, they might shift.
okay so before we even start β this whole page lives in the General Commands Manual, and the page is literally called nix3-store-repair(1). that's the name, that's the whole identity. slay.
β¨ NAME β¨
nix store repair β repair store paths π©Ή
β¨ SYNOPSIS β¨
nix store repair [optionβ¦] installablesβ¦
β¨ EXAMPLES β¨
so like, here's the moment. u clock that a store path is corrupt, and then u repair it. no cap:
# nix store verify /nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10
path '/nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10' was modified! expected hash 'sha256:1hd5vnh6xjk388gdk841vflicy8qv7qzj2hb7xlyh8lpb43j921l', got 'sha256:1a25lf78x5wi6pfkrxalf0n13kdaca0bqmjqnp7wfjza2qz5ssgl'
# nix store repair /nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10
look at those hashes. one's the expected one, one's the one we actually got. the way they do NOT match?? π anyway then u hit repair and we move. π«Ά
β¨ DESCRIPTION β¨
k so this command attempts to βrepairβ the store paths u hand it (those are the installables) by redownloading them using the available substituters. π
and if there are no substitutes available? then repair is literally not possible. that's it, that's the whole story. π
Warning π¨ listen bestie, listen. during repair there is a very small time window where the old path (if it even exists) gets moved out of the way and replaced with the new path. if repair gets interrupted in that lil gap, the system may be left in a broken state. like β the example they give is if that path contains a critical system component like the GNU C Library. so do NOT be cute and hit Ctrl+C mid-repair. main character energy only when it's safe. π
β¨ OPTIONS β¨
--stdinβ read the installables from standard input. no default installable gets applied. periodt.
π§ Common evaluation options
--argname expr β pass the value expr as the argument name to Nix functions.--arg-from-filename path β pass the contents of file path as the argument name to Nix functions.--arg-from-stdinname β pass the contents of stdin as the argument name to Nix functions.--argstrname string β pass the string string as the argument name to Nix functions.--debuggerβ start an interactive environment if evaluation fails. little rescue mission. π§--eval-storestore-url β the URL of the Nix store to use for evaluation, i.e. to store derivations (.drvfiles) and inputs referenced by them.--impureβ allow access to mutable paths and repositories. chaotic but permitted. π--include/-Ipath β add path to search path entries used to resolve lookup paths.
this option may be given multiple times.
paths added through -I take precedence over the nix-path configuration setting and the NIX_PATH environment variable. π
--override-flakeoriginal-ref resolved-ref β override the flake registries, redirecting original-ref to resolved-ref.
π¦ Common flake-related options
--commit-lock-fileβ commit changes to the flake's lock file.--inputs-fromflake-url β use the inputs of the specified flake as registry entries.--no-registriesβ don't allow lookups in the flake registries.
DEPRECATED π use --no-use-registries instead.
--no-update-lock-fileβ do not allow any updates to the flake's lock file.--no-write-lock-fileβ do not write the flake's newly generated lock file.--output-lock-fileflake-lock-path β write the given lock file instead offlake.lockwithin the top-level flake.--override-inputinput-path flake-url β override a specific flake input (e.g.dwarffs/nixpkgs). the input path must not be empty. this implies--no-write-lock-file.--recreate-lock-fileβ recreate the flake's lock file from scratch.
DEPRECATED π use nix flake update instead.
--reference-lock-fileflake-lock-path β read the given lock file instead offlake.lockwithin the top-level flake.--update-inputinput-path β update a specific flake input (ignoring its previous entry in the lock file).
DEPRECATED π use nix flake update instead.
π’ Logging-related options
--debugβ set the logging verbosity level to βdebugβ.--log-formatformat β set the format of log output; one ofraw,internal-json,barorbar-with-logs.--print-build-logs/-Lβ print full build logs on standard error.--quietβ decrease the logging verbosity level. shhh. π€«--verbose/-vβ increase the logging verbosity level. tell me EVERYTHING. π£οΈ
π Miscellaneous global options
--helpβ show usage information.--offlineβ disable substituters and consider all previously downloaded files up-to-date.--optionname value β set the Nix configuration setting name to value (overridingnix.conf).--refreshβ consider all previously downloaded files out-of-date.--repairβ during evaluation, rewrite missing or corrupted files in the Nix store. during building, rebuild missing or corrupted store paths.--versionβ show version information.
π Options that change the interpretation of installables
--allβ apply the operation to every store path.--derivationβ operate on the store derivation rather than its outputs.--exprexpr β interpret installables as attribute paths relative to the Nix expression expr.--file/-ffile β interpret installables as attribute paths relative to the Nix expression stored in file. if file is the character-, then a Nix expression is read from standard input. implies--impure.--recursive/-rβ apply operation to closure of the specified paths.
Note π see man nix.conf for overriding configuration settings with command line flags.
okay that's the whole page bestie, we got there together, and ngl we ate. π this was nix3-store-repair(1) from the General Commands Manual β go forth, repair responsibly, and don't interrupt it mid-swap. mwah. πβ¨π
π¦ where this page comes from
- fedora 44: nix-core 2.35.3-2.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms