> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/document-processing/documents-expiry.md).

# Documents Expiry

## Two retention rules instead of a general deletion period

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-4c7960510b3931c8e255beab1f6a248a71f60ce8%2Fprocess-expiry-en-20261028.png?alt=media" alt="Document expiration and deletion: View two retention settings separately."><figcaption><p>View two retention settings separately. The diagram is schematic; the active settings of your organization determine the actual behavior.</p></figcaption></figure>

Document expiration distinguishes general document retention from completed document retention. Check both settings together with the requirements of your process and the intended target archive.

| Setting                            | What you should clarify                                                                        |
| ---------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Delete document after**          | Which document retention value is actually effective in your organization.                     |
| **Delete finished document after** | Which value applies to completed, fully processed and exported documents.                      |
| **Default**                        | Which system standard is stored in your deployment. The name alone does not indicate duration. |

The diagram is **not a timeline drawn to scale**. It specifies neither the technical start of the retention period nor which setting takes precedence. A dropdown value alone does not establish a deletion time accurate to the second. For reliable planning, also confirm how often cleanup runs.

### Separate export, retention and backups

A successful export does not prove that the DocBits copy has already been deleted. Conversely, deleting a document in DocBits does not remove an independently stored ERP or archive copy. Backups may have separate retention rules; deleting a document from the live system does not prove that every backup copy has been removed at the same time.

Check the deadlines before making changes and agree on the target archive and the handling of backups. The [Data storage, retention and deletion](https://docs.docbits.com/security/data-storage-and-retention.md) overview explains the differences between documents, OCR intermediate files, logs and backups.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-ea9216f517d84d5843a34af54f9315ebfdac197c%2Fdocument_expiry_settings_overview.png?alt=media" alt="Documents Expiry settings"><figcaption><p>Documents Expiry settings</p></figcaption></figure>

Under Document Processing → Documents Expiry, configure document retention. Check the effective settings, the target archive and the deletion scope for your organization before changing them.

For each of the two settings you choose a time frame from the dropdown. **Delete document after** applies to any processed document; **Delete finished document after** applies to documents that are fully processed and exported.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-abc876f4c734d68b1e1a702d527666ea58318c52%2Fdocument_expiry_options.png?alt=media" alt="Documents Expiry options"><figcaption><p>Available retention periods</p></figcaption></figure>

| Option       | Meaning                                                                                                |
| ------------ | ------------------------------------------------------------------------------------------------------ |
| **Default**  | Use the system default retention period (no custom override).                                          |
| **48 Hours** | Explicit retention value of 48 hours; confirm the start of the period and cleanup schedule separately. |
| **1 Week**   | Explicit retention value of one week.                                                                  |
| **2 Weeks**  | Explicit retention value of two weeks.                                                                 |
| **4 Weeks**  | Explicit retention value of four weeks.                                                                |

These settings support planned document retention. They do not replace confirming the effective retention periods, target archive and treatment of backups for your organization.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/settings/document-processing/documents-expiry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
