Ok, i see the issue now. It seems that if you delete a main categories that have sub categories then only the main category is being removed.
If you want to make the change in the database, then in your powerstore 3 database, open the ps3_categories table and i would suggest to just renaming the categories to something else. Because deleting those categories will require more work.