Skip to content

v6.5.4: ```

Choose a tag to compare

@thorewi thorewi released this 02 Oct 09:03
· 6 commits to master since this release
feat(files): Add command to delete orphaned files and unify action flags
```
```
Introduces the `files:delete-orphans` console command to clean up
files on disk that are no longer referenced by any database entity.
This addresses disk space accumulation from failed uploads or
restored dumps, balancing the existing `files:fill-mime-type` command.

The command includes critical safety features:
- Requires `--exec` to perform actual deletions, otherwise it only reports.
- `--min-age` protects recently modified files (e.g., during ongoing uploads).
- Refuses to run if no rows reference any files, preventing mass deletion
  due to misconfigured data directories.

For consistency, the `files:fill-mime-type` command's `--dry-run` option
has been renamed to `--exec` to standardize the flag for confirming write
operations across the console commands.
```