You won’t be able to delete it while a device is using it. You can just change what did DTH the device is assigned to through the IDE and pick the generic zwave lock there if you want. But @garyd9 's code is rightly very popular, as is lock manager, it just doesn’t seem like either of them would be the problem. They are both very widely used by the community.
SmartThings is very powerful, but not very intuitive or discoverable, so don’t worry about not figuring things out right away. We’ve pretty much all had to come to the community to ask.
You should check to see just what smartapps are using the lock. Maybe you have multiples assigned. ( you can only have one DTH per device, but you could have multiple smartapps.)