Delete file with history

Hi,

I am running Nextcloud 22.2.3 with mysql database. Today I found 4 files containing a virus, so I would like to delete them completely. I deleted one of them, but in files_versions I still find the file as old version. I think it might be a bad idea just to delete the file on file system level, as there should be a reference in the database. Is there a way to delete the file completely? Is there a way to remove it also in database?

bests

Sascha

file version remain there until the file is completely deleted (or the file versions expiration happens). If you delete the file it initially goes into trashbin and stay there as long the time or quota pressure removes it… file versions of files in the trashbin remain in the system to keep them available in case you recover the file…

so I would expect file versions disappear as well once you remove the file from trashbin…