sometimes some entries in Run History Log prohibit the deletion of the Plugin. Have a look in the log if any deployment artefacts remain there, remove them and try again to delete the plugin.
deleting directly from the DB is not a good idea, you could damage a lot more things.... Did you really check that all objects/virtual hosts/system services from the plugin have been delete everywhere? Maybe you defined a specific Host Type which is still existing somewhere?
If nothing works, you should re-install the system or recover an older backup. In Plugin development in general it is sometimes faster to fall back to an old backup version (you could use a snapshot with ZFS or anything) during your test cycles. Have you already thought about that?