8 **notmuch** **compact** [--quiet] [--backup=<*directory*>]
13 The **compact** command can be used to compact the notmuch database.
14 This can both reduce the space required by the database and improve
17 The compacted database is built in a temporary directory and is later
18 moved into the place of the origin database. The original uncompacted
19 database is discarded, unless the ``--backup=``\ <directory> option is
22 Note that the database write lock will be held during the compaction
23 process (which may be quite long) to protect data integrity.
25 Supported options for **compact** include
27 ``--backup=``\ <directory>
28 Save the current database to the given directory before replacing
29 it with the compacted database. The backup directory must not
30 exist and it must reside on the same mounted filesystem as the
34 Do not report database compaction progress to stdout.
39 The following environment variables can be used to control the behavior
43 Specifies the location of the notmuch configuration file. Notmuch
44 will use ${HOME}/.notmuch-config if this variable is not set.
53 **notmuch-insert(1)**,
56 **notmuch-restore(1)**,
57 **notmuch-search(1)**,
58 **notmuch-search-terms(7)**,