I have done the following procedure with success:
- backup everyting (datadir + database) before you attempt this
- remove folder data/appdata_ocpb8d7vbr73/preview (appdata_ocpxxxxxxxx/preview)
(only the preview dir!) - on the database, execute:
delete from oc_filecache where path like ‘appdata_ocpb8d7vbr73/preview/%’;
Now the previews are gone freeing the diskspace. When a user visits the folder and diplays previews, the previews are regenerated for that folder.
Note that this slows down nextcloud significantly, until previews are generated again, i.e. when previewing a folder for the first time.
Note also that, while i have tested this procedure with nextcloud 12.0.3, it is most probably not supported by the Nextcloud team