LinuxCommandLibrary

nix3-store

Manipulate the Nix store.

TLDR

Collect garbage, i.e. remove unused paths to reduce space usage

$ nix store gc
copy


Hard-link identical files together to reduce space usage
$ nix store optimise
copy


Delete a specific store path (most be unused)
$ nix store delete [/nix/store/...]
copy


List a contents of the store path, on a remote store
$ nix store --store [https://cache.nixos.org] ls [/nix/store/...]
copy


Show the differences in versions between two store paths, with their respective dependencies
$ nix store diff-closures [/nix/store/...] [/nix/store/...]
copy

Copied to clipboard