---
title: "Command reference"
manual: "Filefix"
version: "main"
permalink: "https://docs.typo3.org/permalink/anubit/filefix:command-reference@main"
source: "CommandReference/Index.rst"
rendered: "2026-10-16T12:43:55+00:00"
---

# Command reference {#command-reference}

The cleanup commands are meant for scheduled or unattended runs (cron, TYPO3
Scheduler) once you trust the tool for a given site.

## filefix:cleanup:scan {#command-cleanup-scan}

Scans file storages for cleanup candidates and queues them in
`tx_filefix_quarantine`.

| Option | Description | Default |
| --- | --- | --- |
| `--storage` | Storage UID to scan | `1` |
| `--folder` | Restrict to a FAL folder identifier (for example `/images/`) | (all) |
| `--older-than` | Duration string: `90d`, `2w`, `24h` | `90d` |
| `--limit` | Maximum candidates per scan type | `5000` |
| `--include-unused` | Scan for unreferenced FAL files | off |
| `--include-missing` | Scan for FAL records whose file is gone | off |
| `--include-physical-orphans` | Scan for un-indexed physical files | off |

```bash
vendor/bin/typo3 filefix:cleanup:scan --folder=/2021/ --older-than=180d --include-unused
```

## filefix:cleanup:flush {#command-cleanup-flush}

Processes what is already in the queue.

| Option | Description | Default |
| --- | --- | --- |
| `--storage` | Storage UID | `1` |
| `--status` | Status to process: `candidate` or `quarantined` | `candidate` |
| `--older-than` | Only records queued longer than this (for example `14d`) | (none) |
| `--limit` | Maximum records per run | `1000` |
| `--move-to-quarantine` | `candidate` → `quarantined` | – |
| `--delete` | `quarantined` → `flushed` (permanent) | – |
| `--scan-id` | Restrict to one scan's results | (none) |
| `--force` | Allow `candidate` → `flushed` directly, skipping quarantine | off |
| `--dry-run` | Simulate, no changes made | off |

```bash
# Safe pipeline for a cron job
vendor/bin/typo3 filefix:cleanup:flush --status=candidate   --move-to-quarantine
vendor/bin/typo3 filefix:cleanup:flush --status=quarantined --delete --older-than=14d
```

> [!NOTE]
> `--delete` on `candidate` status is blocked unless you pass
> `--force`. The lifecycle is meant to go through quarantine first.

## filefix:stats:update {#command-stats-update}

Rebuilds the unused-file statistics for the [dashboard widgets](https://docs.typo3.org/permalink/anubit/filefix:usage-dashboard@main). Schedulable: add it as a Scheduler task (for example
nightly) on large installations so no dashboard load has to rebuild the
snapshot.

| Option | Description | Default |
| --- | --- | --- |
| `--storage` | Storage UID | default storage |

```bash
vendor/bin/typo3 filefix:stats:update
```
