> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/licensable-features/visitor-management/command-centre-site-configuration/purging-expired-visits.md).

# Purging Expired Visits

### Introduction

An automated purge runs daily to purge expired visits from the system. The ability to purge visits is only available at system level, therefore where the system is used by multiple companies, it will not be possible for them to purge visits according to different "number of days" settings.

You can configure the parameters for when expired visits will get purged from the system, (i.e. the time of day the purge will run, and the length of time visits are kept before they are eligible for purging), via the **Database Maintenance** tab in the Server Properties. See [Database Maintenance](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/server-properties/database-maintenance.md) for details.

**Notes:**

* The "purge process" cannot be disabled.
* In a multi-server system visits are not being replicated, so the purge needs to be run on each server running Visitor Management.

### Operation

Only the visit information itself gets deleted. The following do **not** get deleted as part of the purge:

* Visitors assigned to the visit
* Events generated as part of the visit

An event is logged when the purge starts and another when the purge completes.

If the purge process encounters a visit which cannot be deleted, it will skip that visit and continue deleting the other visits. A message will be logged to the log file showing any available information why the visit failed to delete, and the "purge process" will try to delete the visit again during it's next run, (i.e. the next day).


---

# 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://help.security.gallagher.com/knowledge-hub/configuration-client/licensable-features/visitor-management/command-centre-site-configuration/purging-expired-visits.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.
