snippetbashTip
nix store — Manipulate the Nix store. See also: `nix-store`. More information: <https://nix.dev/manual/nix/stabl
Viewed 0 times
thecommandstorenix storemanipulateclinixsee
Problem
How to use the
nix store command: Manipulate the Nix store. See also: nix-store. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-store.html>.Solution
nix store — Manipulate the Nix store. See also: nix-store. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-store.html>.Collect garbage, i.e. remove unused paths to reduce space usage:
nix store gcHard-link identical files together to reduce space usage:
nix store optimiseDelete a specific store path (must be unused):
nix store delete /nix/store/{{checksum-package-version.ext}}List a contents of the store path, on a remote store:
nix store --store {{https://cache.nixos.org}} ls /nix/store/{{checksum-package-version.ext}}Show the differences in versions between two store paths, with their respective dependencies:
nix store diff-closures /nix/store/{{checksum-package-version.ext}} /nix/store/{{checksum-package-version.ext}}Code Snippets
Collect garbage, i.e. remove unused paths to reduce space usage
nix store gcHard-link identical files together to reduce space usage
nix store optimiseDelete a specific store path (must be unused)
nix store delete /nix/store/{{checksum-package-version.ext}}List a contents of the store path, on a remote store
nix store --store {{https://cache.nixos.org}} ls /nix/store/{{checksum-package-version.ext}}Show the differences in versions between two store paths, with their respective dependencies
nix store diff-closures /nix/store/{{checksum-package-version.ext}} /nix/store/{{checksum-package-version.ext}}Context
tldr-pages: common/nix store
Revisions (0)
No revisions yet.