Never before used occ preview:cleanup but command seems to be missing completely in the list of valid commands from occ preview.
The use case is: trying to add preview images for HEIC and MOV files. While experimenting I thought it would be wise to be able to cleanup my mess and rebuild previews from scratch. Therefore I wanted to check the working of occ preview:cleanup
The Basics
- Nextcloud Server version (e.g., 29.x.x):
Hub 9 (30.0.7)
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 22.04.5 LTS
- Web server and version (e.g, Apache 2.4.25):
Apache/2.4.52 (Ubuntu)
- Reverse proxy and version _(e.g. nginx 1.27.2)
n.a.
- PHP version (e.g, 8.3):
PHP Version 8.3.17 (Apache2 and CLI)
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
first time trying sudo -u www-data php --define apc.enable_cli=1 /var/www/cloud/occ preview:cleanup
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
n.a.
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
n.a.
Summary of the issue you are facing:
[While executing occ preview:cleanup I get ’ Command “preview:cleanup” is not defined.’ as response. This is unexpected if I understand from the docs at [https://docs.nextcloud.com/server/latest/admin_manual/occ_command.htm](https://Nextcloud Server Manual)l ]
Steps to replicate it (hint: details matter!):
Just run occ preview:cleanup or check valid commands with occ preview and see ’ cleanup’ is missing as valid command.
Response is:
Command "preview:cleanup" is not defined.
Did you mean one of these?
files:cleanup
preview:generate
preview:repair
preview:reset-rendered-texts
sharing:cleanup-remote-storages
trashbin:cleanup
twofactorauth:cleanup
versions:cleanup
Log entries
n.a.
Nextcloud
n.a.
Web Browser
n.a.
Web server / Reverse Proxy
n.a.
Configuration
If needed I will provide this.
Nextcloud
If needed I will provide this.
Apps
If needed I will provide this.