.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-store-optimise" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix store optimise\fR - replace identical files in the store by hard links .SH Synopsis \fCnix store optimise\fR [\fIoption\fR\[u2026]] .SH Examples .IP "\(bu" 2 Optimise the Nix store: .LP .EX nix store optimise .EE .SH Description 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 \fCauto-optimise-store\fR to \fCtrue\fR in \fCnix.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 \fC/nix/store/.links/\fR.