about summary refs log tree commit diff
path: root/src/nix-store/help.txt
blob: 7576e3ef5d4202d63ead39f18d4903588de571a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Usage: nix-store [OPTIONS...] [ARGUMENTS...]

`nix-store' is a tool to manipulate the Nix store.

Operations:

  --realise / -r: ensure path validity; if a derivation, ensure the
      validity of the outputs
  --add / -A: copy a path to the Nix store
  --delete: safely delete paths from the Nix store
  --query / -q: query information
  --read-log / -l: print build log of given store paths

  --register-validity: register path validity (dangerous!)
  --check-validity: check path validity

  --gc: run the garbage collector

  --dump: dump a path as a Nix archive, forgetting dependencies
  --restore: restore a path from a Nix archive, without
      registering validity

  --export: export a path as a Nix archive, marking dependencies
  --import: import a path from a Nix archive, and register as 
      valid

  --verify: verify Nix structures
  --optimise: optimise the Nix store by hard-linking identical files

  --version: output version information
  --help: display help

Query flags:

  --outputs: query the output paths of a Nix derivation (default)
  --requisites / -R: print all paths necessary to realise the path
  --references: print all paths referenced by the path
  --referrers: print all paths directly refering to the path
  --referrers-closure: print all paths (in)directly refering to the path
  --tree: print a tree showing the dependency graph of the path
  --graph: print a dot graph rooted at given path
  --hash: print the SHA-256 hash of the contents of the path
  --roots: print the garbage collector roots that point to the path

Query switches (not applicable to all queries):

  --use-output: perform query on output of derivation, not derivation itself
  --force-realise: realise the path before performing the query
  --include-outputs: in `-R' on a derivation, include requisites of outputs

Garbage collector options:

  --print-roots: print GC roots and exit
  --print-live: print live paths and exit
  --print-dead: print dead paths and exit
  --delete: delete dead paths (default)
    
Options:

  --verbose / -v: verbose operation (may be repeated)
  --keep-failed / -K: keep temporary directories of failed builds

  --add-root: add garbage collector roots for the result