Deletelocalcontent does nothing

Hi

I have a remote storage configured and I want to delete some entries local content using the API.

I use flavorAsset->deletelocalcontent($assetId), get no error but the local file is still there, not deleted.

any ideas?

It’s Kaltura 11.4-03

Hello,

All delete operations in Kaltura are soft deletes, i.e, the status is changed in the DB and accordingly in Sphinx but nothing gets physically deleted.
If you wish to clear space, you can certainly write a script that FIRST soft deletes using the API, like you did and then physically deletes the file from the FS.

Just be very careful to delete ONLY files that have been marked as deleted in the DB.

that is not correct.

first of all it works fine on another kaltura server version 10.2

another thing, if that is so, what is the purpose of the option “Purge files on deletion” in the publisher configuration?

It is very correct:) indeed if you set “Purge files on deletion” the case is different but you did not mention that you set it to true. By default, it is false.

Considering that it has been set to true, it should purge the files from the remote storage. If it does not, take a look at /opt/kaltura/log/batch/storagedelete*log and let us see what is in there.

Also, note that the deletion is implemented as a batch job and therefore, will not necessarily happen immediately.
Like I said in the beginning, all the delete API calls simply mark the asset’s status as deleted. You can look at their code to see that if you’d like.