> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-admin/9.3-administer/optimize-the-pentaho-system/performance-tuning/jackrabbit-repository-perfomance-tuning/jackrabbit-hangs-on-unused-data.md).

# Jackrabbit hangs on unused data

Jackrabbit Repository (JCR) often retains to a lot of unused data if you perform migrations from the same repository multiple times. This leads to an increase in table sizes and slowdowns on the repository.

You can clean up this unused data in the JCR by enabling a system listener designed for this purpose. Cleaning up the JCR can only be done with no users logged into it, and the repository remains locked while the process is running.

1. Stop the Pentaho Server.
2. Locate the `pentaho-server/pentaho-solutions/system` directory and open the `systemListeners.xml` with any text editor.
3. Add this bean as the last item within the list tags.

   ```xml
   <bean id="repositoryCleanerSystemListener" class="org.pentaho.platform.plugin.services.repository.RepositoryCleanerSystemListener">
   <property name="gcEnabled" value="true"/>
   <property name="execute" value="now"/>
   </bean>
   ```
4. Save and close the `systemListeners.xml` file and restart the Pentaho Server.

You can customize the settings for the `repositoryCleanerSystemListener` by editing these properties. We recommend cleaning up the Jackrabbit repository on a regular schedule.

| Property      | Description                                                                                                                                                                                                                                                                                                                   |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **gcEnabled** | This is a Boolean flag that turns the listener On (`true`) or Off (`false`).                                                                                                                                                                                                                                                  |
| **execute**   | <p>You can choose to run the listener:- <strong><code>now</code></strong></p><p>runs once during server start-up</p><ul><li><strong><code>weekly</code></strong></li></ul><p>runs on the first day of each week (Sunday)</p><ul><li><strong><code>monthly</code></strong></li></ul><p>runs on the first day of each month</p> |


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdia-admin/9.3-administer/optimize-the-pentaho-system/performance-tuning/jackrabbit-repository-perfomance-tuning/jackrabbit-hangs-on-unused-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
