Cleaning history from old data

Hi All
I am trying to clean history from old data like certain processes and their variables as well. And have found that the method historyService.deleteHistoricProcessInstance(id); does not delete variables.
It just removes the processes (from act_hi_procinst) and activities (from act_hi_actinst)
but tables act_hi_varinst and act_ge_bytearray still contain the records related to the deleted processes.
Please advise how correctly do remove old data from history.
Thank you.

I’ve found that the history level in my configuration is set in NONE. Changing it to ACTIVITY resolves my problem.
But then don’t understand why I see process and variables for it when history level = none

If the history level is set to none, there shouldn’t be any history data.
Are you sure this data was created by an engine that had that setting set?

thank for reply. you lead me to the thought that it might be a default engine with non NONE value worked along with my one in the system. lets me check…