.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-store-optimise" "1" "" .RS .PP \fBWarning\fR .br This program is \fB\fBexperimental\fR\fR and its interface is subject to change. .RE .SH Name .LP \f(CRnix store optimise\fR - replace identical files in the store by hard links .SH Synopsis .LP \f(CRnix store optimise\fR [\fIoption\fR\[u2026]] .SH Examples .IP "\(bu" 3 Optimise the Nix store: .LP .EX nix store optimise .EE .SH Description .LP This command deduplicates the Nix store: it scans the store for regular files with identical contents, and replaces them with hard links to a single instance. .PP Note that you can also set \f(CRauto-optimise-store\fR to \f(CRtrue\fR in \f(CRnix.conf\fR to perform this optimisation incrementally whenever a new path is added to the Nix store. To make this efficient, Nix maintains a content-addressed index of all the files in the Nix store in the directory \f(CR/nix/store/.links/\fR.