Run the Delete Process Instance Job. If there are many records to delete, the job will take long time.
So make sure that you enter date parameters (eg. run month by month).
Also take DB backup before running it.
Delete process instance job removes the respective entries from the following tables: