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
29 replacing it with the compacted database. The backup directory
30 must not exist and it must reside on the same mounted filesystem
31 as the current database.
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.
49 **notmuch(1)**, **notmuch-count(1)**, **notmuch-dump(1)**,
50 **notmuch-hooks(5)**, **notmuch-insert(1)**, **notmuch-new(1)**,
51 **notmuch-reply(1)**, **notmuch-restore(1)**, **notmuch-search(1)**,
52 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**