# Archive Cleanup

Over time, Chamilo accumulates temporary files in its cache and archive directories. Regular cleanup prevents disk space issues.

## What Can Be Cleaned

* **Symfony cache** — Compiled templates, cached configuration, and routing data
* **Temporary files** — Files generated during export, import, and other operations
* **Session data** — Expired PHP session files
* **Log files** — Old log files that are no longer needed

## Performing Cleanup

### From the Administration Panel

Navigate to **Archive cleanup** in the administration panel. Click the cleanup button to remove temporary files.

### From the Command Line

For more control, use Symfony console commands:

```bash
# Clear the Symfony cache
php bin/console cache:clear

# Clear only the production cache
php bin/console cache:clear --env=prod
```

## Tips

* **Schedule regular cleanups** — Set up a weekly or monthly cron job to clear temporary files
* **Monitor disk usage** — Keep an eye on the `var/` directory size, as it grows with cache and log files
* **Be careful with logs** — Before deleting log files, check if they contain information you might need for troubleshooting


---

# Agent Instructions: 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:

```
GET https://docs.chamilo.org/administration-guide/admin-guide/maintenance/archive-cleanup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
