diff --git a/doc/manual/nix-collect-garbage.xml b/doc/manual/nix-collect-garbage.xml
index 1de50408e..dc84cd803 100644
--- a/doc/manual/nix-collect-garbage.xml
+++ b/doc/manual/nix-collect-garbage.xml
@@ -57,16 +57,6 @@
-
- age
-
-
- This option corresponds to the
- option in nix-store .
-
-
-
-
diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml
index 82c55daba..da96630a5 100644
--- a/doc/manual/nix-store.xml
+++ b/doc/manual/nix-store.xml
@@ -167,24 +167,37 @@ output.
Description
- The operation performs a garbage
- collection on the Nix store. What it does specifically is
- determined by the sub-operation, which is one of the
- following:
+ Without additional flags, the operation
+ performs a garbage collection on the Nix store. That is, all
+ paths in the Nix store not reachable via file system
+ references from a set of roots, are deleted.
+
+
+
+ The following flags may be specified:
+
+
+
+
+ This operation prints on standard output the set of
+ roots used by the garbage collector.
+
+
+
+
This operation prints on standard output the set of
live store paths, which are all the store
- paths reachable from a set of root store
- expressions read from standard input. Live paths should
- never be deleted, since that would break consistency —
- it would become possible that applications are installed
+ paths reachable from the roots. Live paths should never
+ be deleted, since that would break consistency — it
+ would become possible that applications are installed
that reference things that are no longer present in the
store.
@@ -215,32 +228,39 @@ output.
-
- The set of root store expressions is read from standard input.
- Each line should contain exactly one store path.
-
-
-
- The option specifies a minimum time
- in hours that an unreachable store path must not have been
- used before it is considered dead. The default is 0 (consider
- all unreachable store paths dead). Whether a store path has
- been used is determined by looking at its access time
- (atime), so this does not work if the store
- is located on a file system that has the
- noatime option set.
-
-
-
-
- You generally will want to use the command
- nix-collect-garbage, which figures out
- the roots and then calls this command automatically.
-
-
-
+
+ Roots
+
+ The roots of the garbage collector are all store paths to
+ which there are symlinks in the
+ directory prefix/nix/var/nix/gcroots.
+ For instance, the following command makes the
+ path /nix/store/d718ef...-foo a root of
+ the collector:
+
+
+$ ln -s /nix/store/d718ef...-foo /nix/var/nix/gcroots/bar
+
+ That is, after this command, the garbage collector will not
+ remove /nix/store/d718ef...-foo or any of
+ its dependencies.
+
+ Subdirectories
+ of prefix/nix/var/nix/gcroots
+ are also searched for symlinks. Symlinks to non-store paths are
+ followed and searched for roots, but TODO.
+
+
+
+
+ Configuration file
+
+ TODO
+
+
+