This will delete from html
gw -s "delete from html where Title\Meta\Body like 'your_terms'"
but to also delete related urls from refs, you will need to write
a small vortex script to delete each url that is found in html
..
<sql row "delete from html where Title\Meta\Body like 'your_terms'">
<sql novars "delete from refs where Url=$Url"></sql>
</sql>
..
Always make sure you do a select beforehand so that you know you
are deleting the correct urls. There is no undelete.