Updating data directly in the database, especially page data, is not recommended at all. Since you're using versioning, your best bet is to use the API to perform that update/deletion of records. I'd create a module or a webpart which will allow you to select a path or an individual page and perform the actions you need. This will have much better results than doing it manually.