* Some GC documentation.
This commit is contained in:
parent
6c8cf567b8
commit
229252941a
|
@ -57,16 +57,6 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>--min-age</option> <replaceable>age</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This option corresponds to the <option>--min-age</option>
|
|
||||||
option in <command>nix-store <option>--gc</option></command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
|
@ -167,24 +167,37 @@ output.</para>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The operation <option>--gc</option> performs a garbage
|
Without additional flags, the operation <option>--gc</option>
|
||||||
collection on the Nix store. What it does specifically is
|
performs a garbage collection on the Nix store. That is, all
|
||||||
determined by the sub-operation, which is one of the
|
paths in the Nix store not reachable via file system
|
||||||
following:
|
references from a set of <quote>roots</quote>, are deleted.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following flags may be specified:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--print-roots</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This operation prints on standard output the set of
|
||||||
|
roots used by the garbage collector.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--print-live</option></term>
|
<term><option>--print-live</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This operation prints on standard output the set of
|
This operation prints on standard output the set of
|
||||||
<quote>live</quote> store paths, which are all the store
|
<quote>live</quote> store paths, which are all the store
|
||||||
paths reachable from a set of <quote>root</quote> store
|
paths reachable from the roots. Live paths should never
|
||||||
expressions read from standard input. Live paths should
|
be deleted, since that would break consistency — it
|
||||||
never be deleted, since that would break consistency —
|
would become possible that applications are installed
|
||||||
it would become possible that applications are installed
|
|
||||||
that reference things that are no longer present in the
|
that reference things that are no longer present in the
|
||||||
store.
|
store.
|
||||||
</para>
|
</para>
|
||||||
|
@ -215,29 +228,36 @@ output.</para>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>
|
</refsection>
|
||||||
The set of root store expressions is read from standard input.
|
|
||||||
Each line should contain exactly one store path.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<refsection>
|
||||||
The option <option>--min-age</option> specifies a minimum time
|
<title>Roots</title>
|
||||||
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
|
|
||||||
(<literal>atime</literal>), so this does not work if the store
|
|
||||||
is located on a file system that has the
|
|
||||||
<literal>noatime</literal> option set.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<warning>
|
<para>The roots of the garbage collector are all store paths to
|
||||||
<para>
|
which there are symlinks in the
|
||||||
You generally will want to use the command
|
directory <filename><replaceable>prefix</replaceable>/nix/var/nix/gcroots</filename>.
|
||||||
<command>nix-collect-garbage</command>, which figures out
|
For instance, the following command makes the
|
||||||
the roots and then calls this command automatically.
|
path <filename>/nix/store/d718ef...-foo</filename> a root of
|
||||||
</para>
|
the collector:
|
||||||
</warning>
|
|
||||||
|
<screen>
|
||||||
|
$ ln -s /nix/store/d718ef...-foo /nix/var/nix/gcroots/bar</screen>
|
||||||
|
|
||||||
|
That is, after this command, the garbage collector will not
|
||||||
|
remove <filename>/nix/store/d718ef...-foo</filename> or any of
|
||||||
|
its dependencies.</para>
|
||||||
|
|
||||||
|
<para>Subdirectories
|
||||||
|
of <filename><replaceable>prefix</replaceable>/nix/var/nix/gcroots</filename>
|
||||||
|
are also searched for symlinks. Symlinks to non-store paths are
|
||||||
|
followed and searched for roots, but TODO.</para>
|
||||||
|
|
||||||
|
</refsection>
|
||||||
|
|
||||||
|
<refsection>
|
||||||
|
<title>Configuration file</title>
|
||||||
|
|
||||||
|
<para>TODO</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue