---
name: "public-inbox-compact"
section: "1"
platform: "linux"
package: "public-inbox"
version: "1.9.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/public-inbox-compact"
---

# public-inbox-compact(1)

compact Xapian DBs in an inbox

## NAME

public-inbox-compact - compact Xapian DBs in an inbox

## SYNOPSIS

public-inbox-compact INBOX\_DIR

public-inbox-compact --all

## DESCRIPTION

public-inbox-compact is a wrapper for [**xapian-compact**(1)](/xapian-compact/1.md) which locks the inbox and prevents other processes such as [**public-inbox-watch**(1)](/public-inbox-watch/1.md) or [**public-inbox-mda**(1)](/public-inbox-mda/1.md) from writing while it operates.

It enforces the use of the `"--no-renumber"` option of [**xapian-compact**(1)](/xapian-compact/1.md) which is required to work with the rest of the public-inbox search code.

This command is rarely needed for active inboxes.

Using the `"--compact"` option of [**public-inbox-index**(1)](/public-inbox-index/1.md) is recommended, instead, and only when doing a `"--reindex"`.

## OPTIONS

- \--all

  Compact all inboxes configured in ~/.public-inbox/config. This is an alternative to specifying individual inboxes directories on the command-line.

- \--blocksize

  - \--no-full

  - \--fuller

  These options are passed directly to [**xapian-compact**(1)](/xapian-compact/1.md).

## ENVIRONMENT

- PI\_CONFIG

  The default config file, normally "~/.public-inbox/config". See [**public-inbox-config**(5)](/public-inbox-config/5.md)

- XAPIAN\_FLUSH\_THRESHOLD

  The number of documents to update before committing changes to disk.  This environment is handled directly by Xapian, refer to Xapian API documentation for more details.

  Default: 10000

## CONTACT

Feedback welcome via plain-text mail to \<mailto:meta@public-inbox.org\>

The mail archives are hosted at \<https://public-inbox.org/meta/\> and \<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/\>

## COPYRIGHT

Copyright 2018-2021 all contributors \<mailto:meta@public-inbox.org\>

License: AGPL-3.0+ \<https://www.gnu.org/licenses/agpl-3.0.txt\>

## SEE ALSO

[**xapian-compact**(1)](/xapian-compact/1.md), [**public-inbox-index**(1)](/public-inbox-index/1.md)
